PREVENTION IS KEY - In most cases, you can solve the problem by taking away the attraction. You do not need to trap and remove the raccoon - that's just a temporary fix anyway.
GARBAGE CANS - If possible, keep garbage indoors, and put it out for the garbage men in the morning. If not, you can drill holes in the side of the can and lid, and then use standard bungee cords to strap the lids on tight.
Note, this isn't a guarantee - it has to be very secure to work.
BIRD FEEDER - You can install a large squirrel
baffle, which will also work for raccoons. You can also temporarily leave the feeder empty until the raccoon stops associating with a food source, then re-fill it.
PET FOOD - This is a no-brainer. If you leave pet food outdoors, it's an open invitation to raccoons, opossums, skunks, stray cats, and more. Bring it inside if you don't want wildlife eating it!
KILLING GOLDFISH - If you have a decorative pond with goldfish, simply buy some chicken wire at a hardware store, and either anchor it down, or make it into a ball that the goldfish can hide in.
RAIDING GARDEN - Raccoons are strong, and excellent climbers. So the usual trick of a fence around the garden won't cut it, unless it's a really good fence, with razor wire around the top.
IN THE YARD - If you think a raccoon is digging in your lawn, it's quite possibly a different animal. Regardless, if you simply want to get rid of raccoons in your yard, your best bet
is to find out whatever is attracting them, and modify it: remove it, or raccoon-proof it.