This article is from the Macintosh hardware FAQ, by Elliotte Rusty Harold firstname.lastname@example.org with numerous contributions by others.
If it's been less than a year since you bought the Mac, then by all
means bring it to a local Apple authorized dealer to get it fixed
under warranty for free. Not all dealers are created equal, and you
don't have to get your Mac repaired by the same dealer you bought it
from. Ask around locally to find out which one has the best
reputation for fast, dependable, hassle-free service.
After the warranty has expired an Apple dealer is generally not the
best (and certainly not the cheapest) place to have your Mac fixed.
A typical Apple authorized repair consists of swapping out the entire
malfunctioning subsystem. It's not at all uncommon for Apple dealers
to repair small problems by motherboard swaps that cost almost as
much or even more than a new Mac. For out of warranty repairs your
best bet is an unauthorized repair shop that specializes in component
level repairs. Be sure to find one that specializes in Macintosh
repairs, not a PC shop that does Macs on the side. Again seek advice
from local bulletin boards and user groups. In the New York City
area I unconditionally recommend TekServe, (212) 929-3645.
If there are no reliable local repair shops, a number of mail-order
repair shops advertise in the back pages of MacUser and MacWorld.
Personally I find it horribly inconvenient to package and ship a Mac
just to get a flyback transformer replaced, but most of these shops
do offer reliable repairs at very competitive prices and many people
on the net swear by one or another.