Mechanical microvalves function by opening and closing pathways through which fluids can pass. They can be operated via various mechanisms such as electromechanical actuation, thermal actuation, or pneumatic actuation. The choice of mechanism often depends on the specific application and the properties of the fluids being managed.