SpaceX controls the reentry of a Falcon 9 first stage with at least three different approaches.
- Main engine gimballing
- Cold Gas Nitrogen thrusters
- Grid Fins on the interstage
After the main engine of a first stage is complete, the cold gas thrusters rotate the stage into the direction of flight which is quite a feat considering its size. But it mostly out of the atmosphere so it is possible.
Three of the main engines re-ignite and decelerate the forward motion vector of the stages flight path. Depending on the mission profile, either enough to return to the launch site, or just enough to land on the ASDS barge, per-positioned downrange underneath it.
The cold gas thrusters then reorient the stage as needed so it is pointy end down (Engines pointing down) so that when it hits the thicker atmosphere it is most aerodynamic to survive the heating.
They fire a single engine (center engine) again to slow down the interface with the heavier atmosphere so that the stage can survive it. The cold gas thrusters are used for attitude control throughout this process as needed.
Then they start using the grid fins to fine tune the flight path to the designated landing location.
Finally in the last few seconds of flight the center engine ignites again and tries to hover slam the landing. They have too much thrust for the remaining weight, so they cannot hover, rather they need to time the landing so that they hit 0 altitude with 0 velocity. Thus the term hover slam, which they practiced with the Grasshopper vehicles at the McGregor, TX test site. (Also tested the grid fins on that vehicle.)
Whenever the main engines (Merlin 1D) are firing they can gimble and offer some level of control. But it is limited as was seen in the first ASDS landing attempt. They lost grid fins hydraulic fluid and came in off course and the main engine was desperately trying to correct on its own and failed.