Take the wheel off the bike and use a tire iron to get the tire off the rim. Basically, you want something to hook under the tire so that you can peel it off the rim. Once you have the tire off the rim, check for foreign material in the tire.
Pull out and feel around the inside of the tire (carefully) for anything that poked completely through and is still inside. The last thing you want to do is put a new tube in only to have it pop because there was still something sharp inside the tire. Take the tube and put in just enough air so that it takes its natural round shape. Next, seat the tube inside the tire and pull the valve stem through the valve stem hole in the rim. Seat the rest of the tire on the rim once the valve stem is through the rim.
Once the tire is fully seated on the rim, put the wheel back on and line up the rim in the frame so that it's even on both sides of the chain stay. You might want to put a little more air in at this point because it's hard to line up a wheel in the dropouts with a flat tire. Once you get the right amount of air pressure in the tire, go back and fine-tune the wheel's position in the dropouts. Tighten it down and you're back in action.