I find it weird that I've been driving a car for over a year, but I've never been taught how to change a tire.
Unless you have a parent that finds it important to teach this to you, you'll have to put in the effort to seek out the information on your own. Schools no longer bother to teach basic car repair or household maintenance. Of course, once you leave school, there will be nobody to spoon-feed you suggested topics to learn about, so it pays to get in the habit now of pursuing self education.
As for changing a tire, it is a pretty basic procedure, but a little bit of knowledge on how to do it efficiently goes a long way. You also need to have the proper tools: a jack and a tire iron. Most cars come with a simple jack and a tire iron of the correct size, but I prefer using one of those heavy cross-shaped tire irons because it makes it easier to use body weight as leverage. You can get them at Walmart for $12.59 and leave one in the trunk of your car. A good jack is nice to have around the house, but often impractical to take on the road.
The general procedure is as follows:
1) Remove any hubcap or plastic cover that covers the lug nuts (the nuts that hold the wheel to the axle).
2) Before doing anything with the jack, break the lug nuts loose. This is easier to do with the car on the ground, since when it's in the air the wheel will spin. The easiest way to do this is to put the tire iron on the lug nut, then step on the cross piece of the tire iron with your foot, using your body weight to force the nut to turn. Lug nuts are always fastened far more tightly than most fasteners, because if they come off, so will the wheel, which can lead to an accident.
3) Continue to break the lug nuts loose. When working on lug nuts, don't go around in a clockwise or anti-clockwise order; the proper order is to pick a starting place and then go to the nut directly across from the nut you just worked on, repeating this procedure until all the nuts have been worked on.
4) Once the lug nuts have been loosened enough you can spin the tire iron freely (or as freely as is possible before striking the ground), then you can jack up the car. It is important to place the jack in a place where the car's frame can handle the stress of supporting its weight. Most modern cars make these points obvious by having a notch a few inches wide cut into them for your jack to slot into, and there is usually one right next to each wheel. Read your car's manual for more information on where it is safe to put the jack.
5) Once the jack is in place, raise the car up on it. The exact details of how this is done depends on your jack, but the emergency jack that comes with the car usually operates by a screw or bolt that you turn that raises the car. When the car is raised, be careful not to jostle the jack and risk knocking the car off of it.
6) With the car raised, you can now fully remove the lug nuts that you loosened in step 3. This will allow you to remove the wheel with the flat tire. Be sure to put the lug nuts in a secure place where they won't roll away and be lost—a clean plastic cup is most convenient, but your pocket will also do.
7) Place the new wheel on, being sure to face the valve stem (where you add air to the tire) toward you.
8) Replace the lug nuts and tighten them, following the order specified in step 3.
9) Carefully and slowly lower the car back to the ground. You don't want to go too fast and cause the car to bounce when it lands.
10) With the car on the ground, tighten the lug nuts again as tight as they will go, using your body weight on the tire iron to ensure this. As mentioned above, you absolutely don't want these nuts to come loose.
11) Most cars ship with a compact spare or "donut". Read your car's manual to learn what safety restrictions are in place when driving on a donut. Most donuts are not recommended for use above 50 MPH. You should use the donut as little as possible, until you can take your car to a tire shop and replace or repair the flat tire.