There are two different style of helmets- foam interior helmets and harness suspension helmets.
Foam helmets crush permanentyl to absorb the blow of an impact. These helmets are light weight and nice to wear but are not very durable.
Harness suspension helmets are ade of a thick outer shell and have a webbing interior. They dent upon impact. They are much more durable but heavier.
Some Helmet Criteria-
Fit: The helmet must should rest properly on your head. Modern helmets have a number of straps that make it adjustable. Some models come in different sizes. Make sure your helmet fits as per the manufacturer's suggestions.
Ventilation: The walls in Yosemite can get warm during the summer and even in cooler weather, you can cook in the sun. Having vent slots on the helmet can help significantly with the heat. There is a trade off as more vents offer less protection.
Weight: Heavier helmets offer more protection and durability. Lighter models can be nicer to climb in but take fewer impacts before they break. Know what kind of climbing you will be doing- trad routes, big walls, alpine climbing, and cragging can each have a different type of helmet.
Wear and helmet and be safe out at the cliffs! Check out what your local Touchstone gym has to offer for climbing helmets.