While you may never actually change a tire yourself, it’s useful to know how to do it and the knowledge will give you confidence when the inevitable does occur. However, before you get to that point you will need to make sure that you have what is necessary to complete the job, that it’s in good shape and you know how to use it. You car should come with a spare tire and a jack. Check the spare tire on a regular basis to ensure it’s in good shape. Pull the jack out and make sure you know how to use it. If the tires have wheel locks, make sure you know where the key is (I suggest keeping it in the sealed plastic bag along with the car manual in the glove box). Practice loosening the lug nuts. Do you have the right wrench or do you need to get a better one? Considering changing a tire can be a messy job, I also suggest a large shirt to change into, a large towel (for spreading on the ground), a flashlight and a pair of gloves. You might also want to keep a brick in the car to chock the opposite wheel. Read the manual to familiarize yourself with where to place the jack, how to use the wheel locks and their recommended steps to change the tire.
For the nuts and bolts of changing a tire (pun intended), I found this article to be useful. I recommend reading it well ahead of actually needing it.
At this point you may consider joining a road assistance association. Please note that in an emergency this will require a working cell phone and length of time that you might not have. You may choose to change the tire yourself and now you’ll know how.