You should contact your local animal control and they can give you the "legal" ways to capture it. Cages are used, but foxes do not like going into them. This appears to be a difficult task. You will probably have more luck keeping them away than catching one.
You need to buy a fox trap and some fox attractant to trap the fox. It shouldn't be to difficult once you do this. If you trap the fox and it is still alive call your local animal control department to ask how to get it back to its natural woods habitat away from people.
I wouldn't recommend trying to trap it yourself. You should be able to find an wild animal rescue group listed in your phone book. Almost all of them will come out and do a capture and release which means they will relocate the fox to a safe place.