Many states have a transit permit or similar temporary registration. The way it's always worked for me when purchasing a vehicle out of state is to get the transit permit (usually a nominal charge with no sales/use tax--when I got my motorhome in New Hampshire it was either $10 or $20), drive the vehicle to the home state with the signed-over title, bill of sale, odometer statement, and whatever other paperwork is needed, and then patronize the home state Department of Motor Vehicles and pay the tax, title, and registration fees.
Not all states offer a temporary registration of some sort. Massachusetts, in particular, neither offers one nor recognizes them from out of state for their residents. The alternative, though it is much more hassle, is to get the title and bill of sale and whatnot from the state you're buying from, bring them back (without the vehicle) to your home state, get the title and registration, and then return with the newly issued title to drive the vehicle home.
Of course, you do (generally) need to have insurance coverage whenever you drive the vehicle, even with a temporary registration.