Depends.
Heavily used areas (near population centers) can have designated parking areas and even pay kiosks for popular trailheads. In the less-used parts of public land, you can pretty much pull off and park wherever. Generally you'll find where other people have done the same before you and there's no need to create your own parking spot or campground.
Don't be that guy.... Be courteous and make sure that you're not blocking access for other folks (e.g., by parking in the middle of a lightly-used 2-track road).
Also, if you've driven 5 miles and have seen only one party camped along the road, don't go back and camp right next to them unless you're invited, or there's genuinely no other place to camp. Find your own place and enjoy the solitude.
Lock up your vehicle and hit the trail. I pull the distributor rotor out of my older vehicles that have no way to lock the hood, lock the gas cap, and stash the battery in the back among my junk. That's for my own peace of mind, but I have never had a problem with tampering/theft.