They take an airbrush with makeup inside it to the person's face before the shot. Then, the do a lot of post-processing to the photo. Like others said, there is SO much done to make the ppl look good that they look very different in person! It is sad when teen girls try to look like the ppl on magazine covers 'cause it is fake and they can never achieve that look, but they sometimes do bad stuff to try (such as make themselves stick-thin). Yes, they Photoshop weight off the models/stars, too*. Sometimes they also adjust their facial bone structure and stuff, too, to try to get them to look "perfect".
You may remember years ago when the mother of those septuplets (McCoughey or something?) was on the cover of "TIME" after the babies were born. Some of her teeth were messed up, at wrong angles, and "TIME" didn't want that imperfect look on their cover, so they Photoshopped the photo to give her perfectly aligned teeth. They got some flak for that. (Although, I think she got free braces out of it from a local orthodontist who donated his services.)
[*I admit I have done this before, although the model was actually Kate Moss skinny in real life. I didn't take the photo and the angle she was posed at revealed a little pooch that was distracting, so I Photoshopped it off. In real life, I bet she'd have died without that weight, LOL!]