Hi – you need the green paper – similar to a log book of a uk car and ensure you have the sales document signed by the seller alongside a copy of their nie. Ideally both of you go to a gestor to get it done otherwise you can be left with a car and no documents and whilst this is legal (you can insure tax etc it) it means you cant sell it on and in theory if you are stopped, the car can be impounded without you being able to prove ownership!!!
Re the tax (road cirulation) you can go to the town the car is registered in with its matriculation (number plate) and enquire if there is any outstanding tax
A getsor/abogado will be able to tell you if there are any OTHER outstanding charges on it ie unpaid personal tax, bankruptcy order etc.
A car/boat is like a house out here and the new owner can inherit all of these liabilities so please, please, please take care – I got caiught when I first came to Spain like this and things havent changed!!!