It's a three-block structure:
On the top, you place a block that falls down ( sand or gravel)
In the middle, a solid regular block (such as wood or stone)
In the botton (at floor level), an empty block.
When you want to pass, destroy the solid block, and the top block will fall down and fill the empty space at the bottom. Thus, a door.