Pure Pursuit is a type of geometric steering control. It is a lateral controller whose goal is to help a vehicle follow the desired path.

It uses a look-ahead point, a fixed distance on the reference path ahead of the vehicle. The vehicle needs to proceed to that point using a steering angle which we need to compute. We use the rear axle as the coordinate frame for our calculation. For simplicity, we use the bicycle model.

Using the law of sines, we can determine the look-ahead distance ($l_{d}$). Kappa (κ) is the inverse of the radius of curvature ($R$). Using this, we can come up with a control law for finding the desired steering angle ($δ$)

We can also find the cross-track error using the kappa and look ahead distance.

The farther away we are, the more the Kappa, and since tan inverse is monotonically increasing from $\frac{-π}{2}$to $\frac{π}{2}$, the higher the kappa, the higher the steering angle. Which makes sense. The farther you are, the more you turn.
This is a purely lateral controller, and we do not control the linear velocity. Hence this may result in aggressive maneuvers while trying to turn at high speeds and jerky motions. We will make the look-ahead distance proportional to the forward velocity for this issue. This ensures that we have smooth turns.

The pure pursuit controller has some specific properties; for example,
These properties make it a very effective controller. Links to code examples and research papers are provided below. The student team I am part of has implemented this controller as part of our autonomous system stack. Be sure to take a look at that too.
Code: