The edible cacti are all flat-leaved Opuntia species (Platoputia). Their "leaves" (actually stems, the spines are modified leaves) can be eaten like vegetables. Do not lop off the top of any barrel-type cactus and expect anything edible. Like Blob wrote, it will make you so sick you'll wish you were dead. And you've killed a cactus that took decades if not centuries to grow, for nothing. Opuntia species are much faster growing, and don't accumulate the alkaloids that the barrel-type do. If you cut off a few pads to eat, the plant can grow them back within a few years. If you take a pad off and bury it cut side down about 2/3rds and water it a little, it will grow into a new plant. All Opuntia pads can be eaten, but some are more palatable than others. Nopales are specifically grown as food, and generally have fewer spines than "wild" Opuntia species, like Beavertails.
Do not handle any of the cacti with tiny spines (glochids) with gloves. You will not notice at first, but those tiny bastards will work their way through even the best leather gloves and ruin them. Either handle them with tongs, or roll a newspaper page into a rope and loop around the pad to handle it. In a pinch, poke the pad with a stick and singe the spines off the pad over an open flame. Boiling the pad also swells the spines and makes them disintegrate. Always stand upwind when you handle these spined pads, as the spines will break off with handling and blow in the wind. If you get them in your face you will once again, wish you were dead.
If you do get the spines in your skin, wash with very hot soapy water, as hot as you can stand it. The spines will swell and eventually wash out. The affected area will be irritated for a few days. If you get them in your face, eyes, or mouth, get professional medical attention as soon as you can. Alternatively, you can take a piece of duct tape (love that stuff) and apply to the spines and pull them off, but this is fairly painful to do. But still better than the damn spines. If you get them in your clothing, change and wash in hot water as soon as possible. Everything that touches your clothing before washing, like the clothes basket, must be washed to be clear of the spines. They get everywhere and are hard to get rid of.
Now you may eat the fruit of almost any cacti, but they vary greatly in their palatability. The most tasty are those of prickly pear and saguaro, but they are an acquired taste. They are generally stewed and made into jam or then dried like fruit leather. They can also be fermented and made into an alcoholic beverage!
Nopales taste like tart green beans. I love them best fried with onions and a little meat and eaten with tortillas. Good ones are hard to find in ****** restaurants, but worth the search.