Insight on analog and digital Lock-in amplifiers operation principle?
I know two ways to do a lockin (you can implement either with analog or digital parts..)
The first involves multiplying two signals together. (one signal and one reference)
The second is +1/-1 gain switch of the signal.  The switch is controlled (flipped) by the reference.   The low pass follows either operation. 

Edit:  Of course I forgot the phase adjustment.  (or do both phases ala Spehro above.)
If you have a digital 'scope you can make a poor man's lockin. Signal into one channel and the reference into the other, trigger the 'scope off the reference and average.  

Edit2:  schematics.  For the digital version I suppose you just digitize both the signal and reference and do the math in software.  (I'm sure there are some tricks).  In analog, the classic "lock-in" IC is the AD630 there are some nice schematics in the linked data sheet.