How do I make a door open and close by pressing "E"

I’m sorry but I still do not understand, would you make some prints of this example?, would you make some prints of this example?