Piezoelectricity is the property of certain matter to generate an electric charge when subjected to mechanical stress or pressure.
Piezoelectric Effect
When mechanical pressure is applied to a piezoelectric material, the internal structure of the piezoelectric material changes which causes a separation of positive and negative charges and this charge imbalance builds an electric field and a voltage across the material.
Materials like crystalline materials and ceramic materials have this Piezoelectric property. Quartz, a crystalline material composed of silicon dioxide (SiO2) is a Piezoelectric material.