If you buy a ready-built computer, then you'll have warranty on the whole thing, if anything breaks. It's a package and the warranty covers everything.
If you buy parts and build your own, then the warranty will vary from part to part. Most peripherals have a one year warranty (which is...