First, a buyer-seller contract must be drawn up and signed by both parties. Then the registration needs to be put under the new owner's name and the license plate either changed or kept with the car under the new owner's name.
The legalities would likely differentiate greatly from state to state. Naturally one party can sell a car to another party legally if the title is possessed by the owner and a clean bill of sale is issued at the time of purchase to the interested party.