How do different sensor technologies like capacitive, piezoelectric, and optical work?

For those familiar with different sensor technologies like capacitive, piezoelectric, optical, or MEMS, how do they work, and what are the most important things to know when selecting one? What trade-offs have you encountered between these technologies, particularly in terms of power consumption, cost, and performance?