A harness and leash held by you. From personal experience, cats are safer and healthier when kept indoors. We used to let our cats outdoors when I was a kid, but even though they usually stayed in our yard it didn't save Scooter from being attacked by another cat and having his leg ripped open. He was lucky that he didn't get any diseases to boot. No more outdoor kitties after that.
Electric fences are not recomended for cats. Thisl ink has a excellant fencing system its pricey but it works my aunt has two and has had them for 3 years and no cats have gotten in or out. She loves it. I wish I could afford one. http://www.purrfectfence.com/