How do you make a door able to be opened and shut

I think this should help!