Minecraft wiki entry for Enderman_farming, associated text: Level the surrounding land and dig a 3x3x3 pit in the ground.
In the center of the pit, build a tower (at least 4 blocks high.)
Place 1 piston on each side of the tower
Conduct a test of the pistons.
Rig a lever behind a piston with one block in between (at the farthest extent of your reach) and place redstone in a ring around the pistons.
When the redstone, lever and pistons are correctly placed the pistons should extend and fill every space except the center and create an enclosed 2 block high space.