Summarize:

Smelt six iron ingots, then open a crafting table. Arrange the ingots in the crafting area in a tall 2 x 3 pattern. Drag the iron door to your inventory, then place it wherever you like. If you want to pick up the door again, attack it with any tool (an axe is fastest). Do not break it with your bare hand, or it will fall apart. Iron doors cannot be opened by hand. You'll need to make one of the following to operate it: Lever: Using it once will open the door, and using it a second time will close it. Pressure plate: Simply walk over it to open the door, and have it close automatically behind you. Monsters can use these, so they should only be placed on the inside of the door. Button: Opens the door for a short time, then closes it. Less practical than a pressure plate but harder to use accidentally. Craft an place the control of your choice as follows: Lever: Craft one stick above one stone block. Place it on any surface adjacent to the door, including above or below it. Pressure Plate: Craft two stone blocks on the same row. Place it on the ground in front of the door. Button: Put one stone block alone in the crafting area. Place the button on any surface adjacent to the door. You've just made a door that can only be opened from one side. This is an easy and effective lock, but not the most convenient one. Here are a few ways to get back inside your base, without leaving it open to mobs: Place a second button on the outside. Monsters cannot use it, unless they accidentally fire an arrow at it. Carry around a second pressure plate and place it in front of the door when you want to get back inside. After you walk in, stand on the inside pressure plate while you remove the one outside. Make a secret tunnel and cover the entrance with an easily removed block. Using two levers is not recommended, since you can still lock yourself out if you leave the one on the far side in the "closed" position.
Make an iron door. Decide on a door control. Place the control next to the door. Add a way to get back inside.