When it comes to knowing how to change a tire, the most important thing is to know how to do so safely. Driving on a flat tire can damage the wheel and destroy the tire, however it's important that your car is located well out of traffic and on level ground when you stop. Turn on the hazard lights to warn other traffic, and make sure that the car is in park (or in gear if you have a manual) with the emergency brake on. If you aren't comfortable changing a tire or are unable to do so safely, call a tow truck.
Before starting assemble everything you need. Locate the jack, lug nut wrench and spare, and check that the tire is properly inflated. If you have locking wheel nuts, ensure that you have the key. Find something suitable like a rock or piece of wood to chock the wheels. Some cars don't have spare tires, but instead come with run-flat tires or a can of tire sealant. These are temporary solutions that should get you to a garage where you can have the tire repaired or replaced.
The jacking points are sometimes marked on the side of the car near the wheels, but you can verify their location by consulting the owner's manual. If there is a hubcap or wheel cover, remove it if necessary; some come off with the wheel nuts. Ensure that the jack is on a flat stable surface and lift the car slightly to remove some of the weight from the wheel. With the tire still on the ground to prevent it from spinning, crack the lug nuts. Raise the car so that the tire is completely off the ground, making sure that the jack remains straight. Remove the lug nuts and slide the wheel off the hub. If the wheel seems stuck you can give it a few kicks to loosen it up.
Slide the spare into position and start the nuts by hand. Tighten the lug nuts as much as possible with the wheel in the air, then lower some of the car's weight onto the spare. When lowering the jack, ensure that nothing is in the way (leaving the flat tire leaning against the car when you lower it is a sure way to make a big dent). Tighten the nuts in a star or crisscross pattern to the proper torque indicated in the owner's manual, normally somewhere between 70 and 100 ft/lbs for most cars. If you don't have a torque wrench, ensure that the nuts are good and tight, as these are all that hold the wheel onto the car. Lower the car to the ground, repack the jack, wrench and flat tire, and remove the wheel chock.
Remember that temporary spares are just that – temporary, and shouldn't be run at full speed (they are normally limited to 50 mph) or for long distances. If you are replacing the flat with another full size tire, be sure to re-torque the wheel after a couple of days or a hundred miles or so to make sure that the nuts haven't loosened.