Caption: USGS depiction of the San Andreas fault showing direction of movement
Put two slips of paper on your desk. Put a hand on each, and slide them toward each other. When they reach each other, something has to happen. They can't slide through each other. One piece of paper will have to slide on top of the other.
This very thing has happened many times throughout the Earth's history. It happens today. The Earth's crust - its outer layer - is made up of tectonic plates - huge, irregularly shaped slabs of solid rock. Like your pieces of paper, these plates are always on the move. As they move, they run into each other. The places where these plates meet are called faults.