Fold the pants inside out and place one leg of the pants onto the skinny end of an ironing board, flat out so that the material is as smooth as you can get it. This method works best to get out creases so you're only focusing on one side of the leg material at a time. A table or even the floor will work too. Any firm, long surface will do, although you may have to work on both the front and back of the leg at once. Protect your table from the heat of the iron with a towel.
Heat your iron to the proper setting. This depends on what material the pants are made of; refer to the label tag in the pants if you're not sure. If the label is missing or you're still not sure, opt for a higher setting for thicker materials and a lower heat setting for thinner materials. If the label says to dry-clean only, to be on the safe side, bring it to a professional dry-cleaner and see what she can do.
With a spray bottle filled with water, spritz over the material with a bit of water. You can use the steam setting on your iron too if it has one, but applying water separately before ironing is one of the most effective ways to get rid of those crease marks.
When the iron is heated, move it over the pants, starting at the top near the waistband and making your way down to the bottoms. Move the iron back and forth up the leg in small sections, moving it slowly enough to heat over the creases but not so slowly that you end up singeing your pants. Rotate the leg as you finish ironing one section and continue until you've made your way all around the pant leg and the creases are gone.
Take this side of the pants off and put the other leg of the pants in its place, then iron over the front and back of this leg the same way. You may need to iron over the pants a few times to completely get those creases out; let the material cool a bit before going over it a second time to avoid melting or burning the material. Turn the pants right-side out, and if you need to, iron around the pants this way to finish.