Most cacti have spines. In the wild they help to protect the plant from some of the hottest sun and discourage animals from trying to eat them.
There are many different types of spines, and some of them are very beautiful.
There are long ones:

Short ones:

Hooked ones:
Fine ones:
Hairy ones:
And ones which make fascinating patterns.
If you have any cacti yourself have a look at the spines to see how many different types you can see.