Wooden Spikes are structures that act as walls that inflict damage to all players upon contact, except to whoever placed it and his/her teammates. Spikes will also inflict a small amount of damage on players each time they attack it, even if they are out of range of the actual spikes. When placed, mobs/players can't walk through it, which is very useful when running away from an attacker, or building a base. The wooden spikes can be broken with every tool, but hammers break it faster.
Wooden spikes are very commonly used in a technique called spiking, involving the placement of wooden spikes to gain advantage over another player in PvP. Effective placement and collaboration with teammates can quickly kill players that are more advanced.
The easiest way to use this technique, is to lock the player in with 2 spikes when they are mining. This is effective when done with a teammate. Then, the players can attack the locked player inside and win easily.
Another way this technique is used is for running away. When being chased, placing wooden spikes can harm the opponent and give you an advantage in running away or fighting back.