Instructions
Method 1
Reach Level 2, World 4.
Finish this level as normal until you get to the Koopa Troopa just before the flag at the level's end.
Jump on on the Koopa Troopa multiple times. You will build up points and eventually, you will start getting 1-Ups, rewarding you up to 99 lives. Be careful not to run out of time and die.
Method 2
Go to the first level of the game, in the first World.
Continue until you find the Mega Mushroom.
Wait for the Mega Mushroom to fall and collect it before it does.
Run to the flagpole at the end of the level. Take it down and you will get five 1-Ups. Do this multiple times, playing the same level, to get as many lives as you want.