Here's a short video to help visualize how a lockin amplifier works, mostly using pictures but also a little bit of math!