The Cape is an item that first appeared in the SNES launch game Super Mario World. Its first appearance is in Level 1 of World 2. The item has various abilities. First off, and the most notable is that it allows you to fly: While running at maximum speed the player must jump. This will shoot Mario or Luigi into the air. Once airborne, the player must press the direction opposite of the direction currently flying every half second. Other notable abilities the cape gives you is the ability to glide after pulled off a regular jump, a more effective spin attack and pounding into the ground taking out all nearby enemies when flying.
The following is a full list of abilities that the cape gives you, as well as how to pull them off. Note that this applies to the game Super Mario World only, and not in Super Smash Bros. Melee, which also let you use the cape by pressing right or left and B.
How to pull it off
Allows you to fly through the air.
First get a running start, then press the jump button to soar high above, after that, press right and left, right left, and so on to keep up in the air.
After a jump, allows you to glide safely back to the ground.
Once you either do a big or small jump, press the jump button and keep it down to glide, you will also be able to do this with Yoshi.
High Spin Attack
Super high spin attack allowing you to get to higher areas.
After having a running start, press the L button, and you will do a spinning attack that sends you extremely high.
After flying through the air, you will be able to smash to the ground killing all regular enemies.
Get a running start, jump, and press either left or right, keep that button down, and you will smash the ground.
Super Smash Bros. series
The cape was introduced to the Super Smash Bros. series in Super Smash Bros. Melee. Mario is the only character capable of performing this move, which wouldn't cause too much damage. However, if an opponent threw a projectile at Mario, he'd be able to reflect it back to the sender by using his cape. If used directly upon an opponent, it'd deliver a minimal amount of damage and would turn him around.