How do photodiodes work?

I'm making a laser harp and using photodiodes to detect the breaking of the laser beam... I'm going to detect Arduino as a MIDI instrument and connect it to Raspberry Pi that runs some sort of MIDI software to synthesize sounds generated by breaking the laser beam.

I would like to understand what happens when laser beam is broken? What do photodiodes do? How does Arduino know what to do? And how is the sound generated?

Thank you!

  1. Photodiodes works as Solar panel.
  2. It works as photo cell too.