Note that the glitches here apply to the NES version, and unless noted have been fixed for later re-releases such as in Super Mario All-Stars or Super Mario Advance 4.
This is a simple and minor glitch. Go into quicksand with your P-Meter full as Raccoon or Tanooki Mario. Fly and instead of a flying sprite, Mario will have a walking sprite. This was fixed in Super Mario All-Stars.
In World 3-6, there's a brick on one platform that contains a raccoon leaf. Throw the nearby koopa's shell at the block to release the power-up. Collect it. Then, quickly jump to the brick above and it won't break. This was not fixed in Super Mario All-Stars.
Gray Hammer Suit Mario
Enter the bonus room in 7-8 which includes a Hammer Suit as Tanooki Mario. Jump at the giant ? block, then stand so that the bouncing suit hits you, but transform to a statue before it hits you. If you did it correctly, you should transform into gray Hammer Mario. You're completely invulnerable in this form - but you cannot enter the pipe to exit this room, so you're stuck until time runs out. Ths was not fixed in Super Mario All-Stars.
In the second piranha plant level, enter with a P-Wing. Fly to the last thin pipe in the level and go on it. You'll get hurt and die for no reason at all!
Go to either World 3-9 or World 7-5 as big Mario. Both have pipes directly beside ice blocks. Stand on the pipe and remove the bottom-right ice block from Mario's position, then run and duck to get inside (kick the ice blocks under you away as well). Once you're in this small gap, duck and jump to try to wedge yourself between the ice block and the pipe and hold down. If you did it correctly, Mario should eventually go down beside the pipe and land on the other side, except he's nowhere to be seen. You can now move the screen freely, but are stuck here indefinitely. To return to normal play, you'll need to wait for time to run out and lose a life, or reset the game. This trick works on both the original NES version, as well as the Super Mario All-Stars version.
Small to fiery
In World 5-7, there is a wooden block with a fire flower. Release it as Super Mario but don't collect it. Next, get hit by a Pile Driver Micro-Goomba. After that, hit the question block directly to the left of the fire flower. Collect the flower and you'll become Fire Mario. Small Mario normally would become Super Mario. This was not fixed in Super Mario All-Stars and is meaningless in Super Mario Advance 4 because a Fire Flower changes Small to Fire Mario normally in Super Mario Advance 4.
Squashed statue Mario
Enter World 5-2 as Tanooki Mario. Turn into a statue above the top of the cliff to the left of the player. Mario will slide down as a statue. When he reaches the bottom, he'll die for no reason! It works because Mario escapes the level's boundaries. This was not fixed in Super Mario All-Stars.
Remove Bowser's Fire Abilities and Defeat Him Easily
Enter Bowser's Castle with a P-Wing. There are two seperate Bowser rooms and the glitch requires you to go to a certain one. The easier way to do the glitch takes you to a room with Donut Lifts over lava, but the glitch can't be performed if you enter the door at the end of the hall. The other way takes you to a room with solid block platforms over lava. This is the one where you must enter the door at the end of the hallway. However, getting to this room without losing the P-Wing is very hard, since it requires to get past a Thwomp, and the P-Wing slows your descent, causing you to lose the power-up and the glitch can't be performed. There is a way to get to this room without encountering the Thwomp. Simply take the easier route to the room with lava and Donut Lifts. At the end of the room, instead of entering the door to the Bowser chamber, fly upward and fly to the space between the ceiling and the statue. This will take you to the other room with the lava and the solid block platforms. Warning: do not squeeze your way through the ceiling in this second room; if you do, you will get stuck in the side of the screen until time runs out and you lose a life, and the P-Wing.
Enter the door to Bowser's chamber. Now, fly upward to the wall on the left and you will be in Bowser's other chamber. He will be making belching motions, but will be unable to produce fire. Also, if you are ducking, Bowser cannot harm you, allowing you to beat him easily by ducking under him, and then move out of the way when he is going to ground pound a third time. This glitch wasn't fixed in Super Mario All-Stars
Go to either World 3-9 (as Raccoon Mario) or World 6-10 with a Starman. In both cases, there will be a block containing a vine. Grab onto the vine while you still have Starman power. Even when it wears off, you'll still be somersaulting! Go off the vine to end this. This was not fixed in Super Mario All-Stars or Super Mario Advance 4.
White block invincibility
In World 5-7, go to the bonus area. Find the White Block and duck on it. After you fall behind the scenery, quickly exit the bonus area. If you were fast enough, you won't get hurt by any enemies!