Taking a portrait is quite a complicated process. Many amateur photographers might have a nice DSLR on hand, and be quite adept at taking nature photos, or street photography, but when it comes to something as formal as a yearbook photo, or a wedding portrait, they will need to expand their inventory of photographic accessories.
A Variety Of Lenses
You don't want to just show up to take photos with a stock 50mm lens. That won't give you the best results. Shooting with just a short lens won't present a nice photo. Many professional portrait photographers tend to use a 70mm-200mm lens. The advantage to using these longer lenses is that they provide a more flattering look due to being better at dealing with photographic distortion. In fact, if you were to look at a series of photos of people taken with a series of different lenses, the results would be dramatically different, with the ones taken with longer lenses being much more attractive.
You're not shooting street photography, or doing impromptu fashion runway work, so you should get a tripod and set up you shots. You want to have zero movement for when you take the shot. All of the work setting up the shot can be wasted if you make even the slightest movement. So get a good tripod (not one of these "grip" style ones that are fashionable) that has three solid legs and will lock into place.
Unless you plan on shooting dozens of shots with all sorts of ISO settings and shutter speeds, it's a good idea to have a light meter on hand. This will let you sync up the lighting that you have set up for your portrait subject with the camera. This way you can get the correct shot the first time.
While you can shoot good portraits with just a single flash, many portrait photographers like to use softbox setups. These are designed to throw lots of "fill" lighting on a subject, without flooding them with intense, spotlight-like light. The goal is to create a warm, beautiful, diffused light. The flash light can then act as the "key" light. When you set up the softboxes, make sure to place them a distance from your portrait subject. You don't want them to be up close and personal. They should be spaced several feet away from the subject.
A Stand Alone Flash
Don't try and use the flash unit that comes paired with your camera. You want a dedicated, separate flash unit that can be adjusted. The other advantage to using a stand alone flash unit is that you can position the flash in different areas in relation to the subject. You might want to create a halo or "beauty" shot look with your portrait, in which case the flash will be positioned close to the camera (some portrait photographers even use a ring style flash). Or you might want to create rim light (to accentuate the subject's hair, for example) in which case you can position the flash behind and to the side of the subject.
Whether your taking a wedding portrait or a simple school picture, these tips should help ensure it looks great.