Zoning Ordinances

How can municipalities create local laws to regulate zoning?