This button confuses most people.
Most modern SLR cameras have one. Check your camera's instructions to learn where it is and how to press it.
On my autofocus and digital Nikons it's on the front of the camera near the lens. It's usually on the left side of the camera as it's facing you. You can tap it with a finger of your right hand while holding the camera to shoot. You press it in to activate.
The Nikon F2 of the 1970s had it inside the self timer lever. Other mechanical cameras like my 1970s Minolta SR-T-102 have it at the base of the lens and is pressed to the side to activate. Old Minolta lenses sometimes had these preview buttons on the lenses themselves. They all do the same thing.
Even when people find the button it either does nothing or makes the viewfinder dark for no reason. Let me explain why you care.
Depth of field is how much is in focus from near to far.
Most landscapes like to have everything in sharp focus.
Many portraits have the subject in focus, but not the background.
WHAT DOES THE BUTTON DO?
It stops down the lens' diaphragm to the taking aperture.
On modern cameras it is smart enough to stop the lens down to the aperture chosen by the automatic exposure system. On earlier (1980s) cameras it would just stop down to the smallest aperture and not be very useful in Program and Shutter Priority automatic modes.
WHAT'S A DIAPHRAGM?
The diaphragm is the ring of black metal blades inside a lens. Ever see a camera symbol that's a hexagon inside a circle? That's what the diaphragm looks like.
Diaphragm blades close down partially to make the lens squint down to admit less light. By closing down the clear aperture through which light can pass it also brings some things into focus which otherwise would be blurry.
It's exactly what happens when you squint to see something.
Most cameras have about seven blades. Some cameras and lenses have as few as 3, 4 or 5 blades, telephoto lenses may have 9 blades and old manual lenses sometimes had a dozen or more blades.
WHY DOES THE VIEWFINDER GET DARK?
Simple: less light gets in when the diaphragm stops down.
You usually have to let your eyes adapt a little to the darkness. Getting dark is a side effect; it's NOT the purpose of this button.
Obviously the smaller your aperture the darker it gets.
SO WHY SHOULD YOU CARE?
Once you get over the darkness it allows you to preview what will and will not be in focus.
This is important because, at anything other than the lens' widest aperture, there is always more in focus when you take the photo than when you see it through the finder.
Without this preview you might be making portraits that look great through your SLR viewfinder, but when you see your images on film or LCD you may have distracting objects behind your subject in perfect focus.
I'm always tapping this button to preview what's going to happen.
Of course with digital you also can just look on your LCD afterwards. The preview button is immediate and faster than looking at results.
Always check your depth-of-field while out shooting.
This is how you determine the best-looking aperture for portraits to blur backgrounds, and how you see which aperture gets all of your landscape in focus.