A lot is just experience, and others have given great advice on getting started. I want to add a few rules, in no particular order, that I find valuable. Some of the rules are slightly overkill for basic drive-in camping, but they're worth following anyway.
- If you go hiking, take a small backpack. It should have an extra layer of clothing, some snacks, and water, at minimum.
- Never eat anything unless you are 100% certain you know what it is and it is non-toxic. Only drink from a lake or stream in an emergency, and then purify or boil the water if possible.
- Always bring a hat. Like the girl in the article, I've found myself in unexpected relentless sun.
- Wear sensible shoes. The definition of 'sensible' depends on what you're doing, but when in doubt go slightly overkill.
- Never go into nature alone. Ideally, go with a group of at least 3 people. Then if 1 person is seriously hurt, 1 person can stay with them and the last person can go for help.
- Always tell someone where you are going and when you plan to return. When you get back, tell them you're safe. For a simple weekend campout, that means telling a friend or family member. For a strenuous full-day hike, that means stopping at a ranger station before and after the hike.
- Never go off trail (both because it's easy to get lost, and because it's bad to trample mother nature).
- Always have maps - ideally paper ones. Even for a simple trail, pull out a cell phone and take a picture of the map at the trailhead.
- Bring more supplies (including food and water) than you think you need. With each trip you'll learn more about what you wish you had and what you brought but didn't use.
- Bring backups of critical things. Two flashlights, two ways to start fires, and two knives of some description (they don't have to be fancy).
- Have a realistic view of your limits (and your gear's limits). Seeing a nifty rock face doesn't mean you know how to climb it. Even if you know how, you probably don't have climbing equipment with you.
- Animals are not your friends. Research in advance what animals to expect wherever you're going, and what precautions to take. Camping in bear country is different than camping in raccoon country, for example.
- Research where you're going and pack accordingly. Is there running water? If not, plan how you will get and purify water. Are fires allowed? If not, plan how you will cook your food.
If this whole list is intimidating, just start simply and enjoy figuring things out - it can be a lot of fun as long as you come prepared (and try to over plan and over-pack at first while you learn).