This is a glitch in Super Mario 64. To perform this glitch, you need to open the cannon outside the castle. You have to then launch yourself to the top and grab the wing cap. Then, fly down and land in the cannon again. Aim for the top tower on the castle, and fire. If you aimed right, you should land on the base of the top tower. Move to the face on the right of the front one (or it might be the left...) and dive at it. If you did it right, you should fall through the wall and lose 4 points of energy after falling. But, you will be in a black void BEHIND the castle door. If you go through the door, the game will think you are inside the castle, and you will be behind the door inside. This will continue indefinately, unless you get out. To do this, go "inside" of the castle, and walk through the wall on your left (Mario's right). You will be standing inside of the wall. Pretty weird huh?
Why it Works Edit
The tower is not 100% seamless, and is in fact very holey. As you go through, you are in the small area that Mario runs into before the scene switches to inside the castle. As you go through the door, the system thinks you are inside the castle, but because of the side you enter in, you end up in Dark World "inside" the castle. There is also a one-way seam inside the castle that you can exit through. I don't know how to get there though...
I think that any sort of average gamer could have discovered the glitch. So all average gamers get credit!!!!!!