When mining food from it, try to stay a good distance away, so you don't get damaged by it.
If you position yourself correctly behind the cactus, a Bull, Bully, or Wolf will run into the cactus and turn away from you.
You can in close the Treasure with walls around a cactus since the Pit Trap-Spike combo won't work on it.
Place Boost Pads around it to give your opponents a slow and painful death.
Build a base with this as a wall, seeing as it's essentially an indestructible spike, but beware because the spike damages everything, enemies and allies.
Placing Boost Pads toward a cactus is effective against MOOFIE and the Treasure Chest. As an indestructible spike, the Cactus will keep quickly depleting their health. But make sure you deal the final blow on your target!
There is a similar Natural Structure in the game, called the Bush. It behaves exactly the same as the cactus, but does no damage and spawns in the forest and snow biomes.
Cacti are the only biome specific natural structures in the game.
It's the only natural structure that damages you.
0.74 - Cacti were added and haven't been changed since.