Mob turrets can be used to kill hostile mobs that come into the radius of the turret. The turrets have a radius of 40 blocks but must have line of sight with the mob they are attacking. Turret attacks proc every second and deal 5 hearts of damage with each hit.
To create a mob turret you need a block of obsidian and an end crystal. Place the obsidian as the base of the turret and make sure there is a 3x2x3 radius area above the obsidian cleared for the turret or it will not be placed. Now right click with the end crystal on the obsidian block and your turret will be created. To remove it simply punch the turret(It will not explode when destroying the turrets) and it will drop an end crystal.