Spikes are walls that inflicts damage upon contact with players. When placed, players/mobs cannot walk through the building.
Spikes deal more damage as they are further upgraded. They are often used to build bases to keep enemies away. Spikes do not harm mobs or the players that placed it.
Here are the pages for each type: