If you ride bikes, eventually you'll get a flat. Eventually you'll get dozens of them. It's just part of riding. But the first time you change a tire it can seem a little daunting, and it helps if you know the correct way to do it.
1. Some racers say rubber side down - ALWAYS. I personally think it's okay to flip the bike to change a tire, but make sure the ground isn't rough or dirty. The danger is scuffing or staining your saddle or shifters.
2. LOWEST GEAR. Get it into the 53x11, 50x11, 46x11 - whatever your gearing, get it into the big ring up front and the smallest cog in the back. This is so you know where to pop it back in, and also because the derailleur will be more out of your way on the outside.
3. Release your brakes. Cantilever actually release it, road bikes there's a lever you can pull up.
4. Loosen the skewer.
5. Pull the derailleur back.
6. Pop the wheel out.
7. Not starting close to the valve, use a tire lever to pull the tire over the rim. You can do this with your thumbs too. If you want to be PRO about it, man up and don't use the tire lever.
8. Slide the tire lever towards you pulling the tire over the rim as you go.
9. Pull out the flat tube, don't take off the rest of the tire. Run your fingers along the interior of the tire to try and find what caused the flat. This is a good idea to do even if you know you got a pinch flat (from hitting a hole or something). If something is embedded in your tire and you don't remove it, then you'll get another flat. And then you'll have to walk home, call your significant other, or call Uber.
10. If you're putting on new tires, just pull everything off at this point. In order to make sure you put the tires on the correct direction, stand the wheels up exactly as they will be on the bike when the bike is up. So, looking forward, the cassette is on the right, and the quick releases for front and back are on the left.
11. Check the tires for direction. Often they will have it indicated on the tire. If they don't but have a "V" pattern, the pointy middle of the "V" should be pointing forward.
12. Place the tire with the correct direction against your wheel that is also facing the correct direction. It's just a little precaution - nothing is worse than putting everything on and inflating the tires, only to discover you have to start all the way over because the tires are facing the wrong direction.
13. Place the major tire logo or graphics centered on where the valve will go. That's to find it more quickly, and also because you have to just 'cause.
14. Throw away the little plastic screw on cap and the little lock ring thing. Unnecessary weight.
15. Inflate the tube a little so that it wants to sit in the rim bed.
16. Pull the tire onto the rim, starting around the valve.
17. Use the tire level to pull the last bit of the tire onto the rim (or man up and do it with your fingers).
18. Inflate the tire and close the valve.
19. Put the chain on the 11 in the back (where you took it off).
20. Pull back the derailleur the same way you did taking off the wheel.
21. Push the wheel down. It should just pop right into place if everything's aligned right.
And that's it! A lot of steps when you break it all down, but a lot of it goes quickly and you do it without thinking after doing it enough times. The whole thing shouldn't take longer than 5 minutes, and maybe 7 minutes with a tire swap.