A door that opens automatically when you get near it.
At the beginning a command block with the command "testfor @p[r=7]" is set up, which is activated by a clock every few ticks. This block checks (testfor) every time if a player (@p) is within 7 blocks of the command block ([r=7]).
Now a comparator and a repeater are built onto the block, which emit a signal when the Command Block finds a player. From there a connection can lead to a door. The door should be as close as possible to the Command Block, as the check is made from the Command Block's position.
The Command Block can also be used for other things. For example, to turn on lights, or to send a welcome message.