Every year, the camera manufacturers bring out their latest models touting an ever increasing number of pixels. In theory, the greater the number of pixels, the higher resolution the image. But there's a lot more to it than that.
The size and price of a camera is, in great part, determined by the size of the sensor. Smaller sensors used in most point and shoot camera are about 1/15 the size of those used in the typical DSLR cameras. Cramming the same number of pixels into a smaller sensor means smaller pixels. The smaller pixels just can't absorb the same amount of light as the larger pixels so you end up with noise (graininess) in your photos, particularly when taken under low light conditions.
The chart below is a comparison of sensors sizes used in various cameras - the three smallest sizes are those typically used in point-and-shoot compact cameras:

Here's a great video that explains the megapixel myth by "Pete the Gadget Guy".
In short, when shopping for a digital camera, don't go by the number of megapixels (regardless of what the clueless salesperson tells you). Look at the features, lens quality and how it feels in your hand. Don't buy into the megapixel myth!

Glenda - I fully agree with you about this. It likely takes a lot of homework to determine which have the best sensors, etc. I have had a total of 5 digital cameras since 1999. My first was one of those Kodak 1 megapixel cameras that looked like a brick. It took good pictures. My second one was a Sony 3 megapixel, which also took reasonably good photos. My favorite of all time, was a Canon point and shoot, that was 5 megapixels. It took great pictures, and was easy to use. I dropped that one and had to replace it. I bought another Canon - a SX200 IS 12.1 megapixel with 12x zoom. It took good pictures too, but not as good as the ole 5 megapixel did. One of the great drawbacks for me, was that it relies totally on the LCD screen, and has no view finder. I miss cameras without viewfinders. I bought a Nikon D90 SLR a year ago. I like it too, but still miss that ole 5 MP Canon point and shoot.