What is the difference between a mechanical and membrane keyboard?

A mechanical keyboard has an individual switch under each key, while a membrane keyboard uses a rubber layer beneath the keys. Mechanical keyboards often offer more tactile feedback, while membrane keyboards are usually quieter and more affordable.