I have just replaced my derailleur hanger but it wont tighten properly the back keeps spinning so it never gets fully tight? Is there a special tool I need or is it meant to be like this?
Remove the bolt and nut. Make sure the nut and the area where it seats are clean and degreased. Then ideally using grease (oil is also okay), lubricate just the threads of the nut without getting any lubricant on the contact are between the nut and the frame. Usually that is all it takes to prevent the nut from spinning as you tighten the bolt, or you may have to press on it from the back with your finger as you tighten. You can use a stubby screwdriver or chainring nut tool, but it's not usually necessary on hanger bolts that have been lubricated, and you want the lube anyway so you can remove it later.
If you're still having trouble, a little "wrench English" can help: with your wrench, tilt the bolt off-axis as you're turning it in. You're trying to get the sleeve nut to "catch" and hold still as you turn the bolt.
You do want it tight so that it stays put as best as possible. That said, usually and for most designs the quick release will do that all by itself, so in practice it doesn't really matter most of the time.