Near the university in Bellingham, Washington there is a nice hiking trail that takes you up into the nearby forest. One portion of this trail takes you through a tunnel. Photographing tunnels is fun, but you need to know how to handle the exposure.
The easiest way to do it is to walk to the far end of the tunnel where your camera no longer sees any of the tunnel itself, but only the forest. Set your camera’s exposure adjustments there (manual exposure), then go back into the tunnel and compose your shot. The view of outside will be a perfect exposure.
The other option is to use the “spot metering” function on your camera. Most of the SLR cameras, both film and digital have this feature. You are really just telling the light meter in the camera to use a small spot where you are pointing as the place to adjust to for exposure. This keeps you from having to walk to the end of the tunnel.
If you just try to take the photo without taking into account all of the blackness of the tunnel, the camera will think that everything around you is normal daylight and the exposure will be adjusted to make the tunnel brighter. When this happens, the tunnel will lose the blackness and the outside will be very over exposed and washed out.
You can do the same technique looking out of the windows of a building. The inside of the building is much darker, so step up to the window, adjust your exposure, then step back. The outside will look great.
Have fun experimenting!