The Backward Long Jump (BLJ) glitch is a glitch that occurs in Super Mario 64. [Note: This glitch cannot be performed in the DS remake.]
The entire glitch can be performed many places in the two games. Long jumping backwards is significant because the developers put no backwards speed cap into the game, thus, by chaining together multiple BLJs Mario can gain enough speed to clip through solid objects. There are a few variations of this glitch, but the most popular is used on the "Infinite Stairs" in the uppermost area of the castle. This glitch will allow you to beat the game with less than 70 stars.
Go to the stairs and face the door, with the camera facing Mario. Start to long jump and pull back on the stick, causing Mario to long jump backwards into the staircase. The moment he hits the stairs, press A again and press it repeatedly and rapidly, as this is the only way the glitch will work. If done correctly, Mario will shoot up the stairs and won't stop until he hits the wall at the top. This will allow you to jump into the portal and fight the final Bowser fight.