How to make a door work?

I’m new to this thing, and I just need some help on some things.

Depends on what type of door you want to make…

A door that makes you go to next level or a door that opens and close and let the player go trough