Head into the cavern to the southwest and examine the marble demon face; on the side is a hard-to-see skull switch; press it to lower the bars that blocked your entrance to the castle to the east. Head into the castle and get to the top. Open the door at the north side of the castle; beyond the door, you'll see several satyr head switches, one of which is unlit. Shoot the switch to turn it on. This will create stairs that will allow you to get the blue skull key at the northwest corner of the map. Get the key and use it to enter the building next to it. Inside there are four lion head switches; press the one that is unlit (the one to the west). This will allow you to get the red skull key from the top of the castle. Do so, and then cross the bridge and enter the tower. Inside, you'll find the yellow skull key. Get back on ground and press the lion head switch in the northeastern corner. This will open the bars to the north of the map. Enter the tunnel beyond to exit the level.
Secret exit: Once you get the yellow skull key, go around the building that is locked with the blue key and press the small switch on the back of the building. This will open up an alcove near the start of the level. Enter the alcove to access the secret level, MAP31: Archvile Madness.