How does an optical viewfinder on a film camera work?
There are three ways that film cameras do this:


Using a rangefinder, i.e. a viewfinder that doesn't actually view
through the lens. Common on cheaper consumer format cameras such as
super-8 
Using a beam splitter. The ubiquitous Bolex 16mm cameras
have a prism in the light path that splits the light coming through
the lens, so that some of it goes to the film gate, and the rest
goes to the eyepiece. 

This has the advantage of being through the
lens, and continuous, but at the cost of brightness for the viewer
and a stop or so of exposure for the film. From personal experience,
in low light it can be really hard to focus a Bolex. 
Using a rotating mirror. In this setup a reflective mirror interrupts the
light path to the film, similar to a DSLR, but instead of hinging up it rotates.

When the camera is
stopped the mirror is parked so that it sends the light to the
viewer, and when shooting it rotates, acting as the shutter. While
the mirror is sending light to the viewfinder the film is being
pulled down to get the next frame in position in the gate. Then the
frame is exposed, during which time the viewfinder will be black. This cycle is repeated for each frame

This has the advantage that all the light available goes to expose
the film, but at the cost of some flickering in the viewfinder (I
found that helpful: it lets you know that the camera is running—on
silent cameras it can be almost impossible to tell otherwise).