The main park area for Yosemite is ridiculously crowded this time of year, and the camping options are limited. There are spare cabins, which provide shelter but little else (bring a sleeping bag, etc.) - you'll have to book quite early to reserve one. Final option for the main valley is a grand but rather overpriced hotel (think 300-400/night).
If you are a backpacker, then I'd recommend making a day trip to the main valley. I'd then head North to Tuolumne Meadows and environs for some absolutely beautiful scenery and camping. You may also hike out of the main valley to hit one of two trails - one headed towards May Lake and one traveling through Cathedral Pass. You'll find fewer campers the further in you hike. However, keep in mind that these aren't trails for beginners. You should have some backpacking experience.
The campsites nearest to the trailheads are more crowded, but they are easily accessed from the Tuolumne Meadows area. Note that the hike out of Yosemite Valley is by contrast something like a 2000 foot switchback trail. about 9 years ago