On most cars the front tires do the steering and, on front-wheel drive, most of the driving and braking too. They wear noticeably faster than the rears.
Rotating every 5,000 to 8,000 miles spreads that wear so the whole set reaches the end of its life together, which is both cheaper and safer than replacing pairs at staggered intervals.
The pattern depends on the car. Front-wheel drive usually moves the fronts straight back and crosses the rears to the front. Rear-wheel drive does the opposite. Directional tires can only swap front to back on the same side, and staggered fitments with different front and rear sizes often cannot be rotated at all.
Rotation is also a good moment to check pressures, look for uneven wear and rebalance if you have felt any vibration.