The Theatre Key is an item which allows you to enter the Theatre Door inside the Grand Hall of the Nightmare Mansion.
The Theatre Key can be obtained after completing the first riddle in the Mansions library. To get to the library, you must go to the Fish Hall and find the door leading to the library.
After you are in the library, go up the tower using the stairs until you reach a door. Once you are there you can interact with the door and it will ask you how many Birds, Daggers, Fish, Flowers or Mushrooms are in the boxes located in the library.
Once you have counted them all type in the correct answer and you will enter a new room. From there, the Theatre Key will be on the wall for you to take.
If the Player discards or sells the key, they can get it back by talking to the Pig in Topple Town and he will return it back to the Player.