Barbed wire is probably one of the most common defensive items when building fences and bases. Not only does it get significant damage (half a heart per tick), it also slows the player done as well as the get "tangled" in the mess. It is essentially a combination of a spider web and a cactus.
Barbed Wire Crafting
All you need is 5 Iron Ingots, 4 pieces of flint. Simply put the iron ingots in an "x" shape, and then the flint pieces in the middle parts (shown below). For each set, you get 5 pieces of barbed wire. They can be placed just about anywhere, similar to fences and iron bars.