Cactus is a plant naturally found in desert biomes, which can reach 3 blocks tall.
Getting close to a Cactus will hurt a Player or Mob by 1/2 heart every 0.5s.
Cactus is naturally found in desert biome.
Where they can be collected using any tool.
If the first block (at ground level) is left in place the Cactus will grow up again to reach it's maximum size of 3 blocks, which makes Cactus harvesting really easy. Even starting with one block of Cactus and a bit of patience one can quickly create a Cactus farm by collecting the two upper blocks and planting the collected blocks which will grow up as well.But there is one drawback from not breaking the bottom if the harvested cacti blocks fall on the base of the cactus it will be destroyed, So keep that in mind.
However Cactus plantation has some requirements, first of all it needs to be planted on Sand and won't take root elsewhere.
Cactus also need space to grow up and one won't be able to plant a Cactus next to any other block - including Cactus, which means you can have only one Cactus with no blocks next to it, but they can be diagonal to other blocks or cacti.
However, unlike other plants Cactus does not need water to grow up (this is why it does grow up in desert biomes).
As Cactus generate damage to Players and Mobs close to it, it can be used in a defensive way. One can create a layer of Cactus wall which can help reducing Mobs approach a place. However, due to plantation requirements the wall cannot be perfectly filled and will have to follow a diagonal or in a zigzag pattern which lower the defense power of a Cactus wall against Mobs.
Note: Be aware that passives mobs (chicken, cows, sheeps, etc) will take damages from Cactus and die if out of hearts which can be an issue around animal farms.