Depends on the game. In some I think it's not possible, in others it's a frame perfect trick
Note: frame perfect means that the opportunity only exists during a specific frame of a game, in other words within a specific moment at the rate the game displays discrete images. Nearly all older games (and most newer games) have their rendering code and logic code running in lockstep, so frames are not just discrete graphical events, but discrete ticks of the universe simulation as well.
for MK:Wii, use a mushroom just as blue shell briefly gains height before smashing down on you.