Many people use campgrounds just the way you describe, with no reservations (note: might be worth doing when you are passing through a really popular resort area on peak season weekends. You can always call ahead earlier that day.)
Otherwise, just show up and ask if they have a site that suits your needs (size, electric, water, sewer or dump station, cable TV, pull-through vs back-in, whatever you prefer.) Sites with fewer amenities may be cheaper.
When we are just overnighting, we skip places with pools, playgrounds, etc that we won't use, if the price is higher.
The rate they will quote is per night. It doesn't matter if you are there just to sleep 5 hours or hang out for 18 hours.
One thing to be aware of at generally low-priced campgrounds such as National Forest Service spots is that they may have a gate locked by 10 p.m., midnight, or whatever.