Lag
Lag is the downtime period after performing certain attacks or maneuvers. While in the lag period, a player cannot attack or move, and he or she is completely vulnerable to the attacks from an opponent. Different attacks have different lag-times, with the general rule of thumb that more powerful attacks (such as Jigglypuff's Rest) get longer lag times.
Hitlag
Another portion of lag is known as hitlag. This is the amount of frames between the time you get hit and when knockback actually occurs. Most hitlags are only a few frames, but some hitlags are quite large, such as Samus' fully-charged charge shot. This has approximately 30 frames of hitlag, which is one of the few hitlags that is noticeable in real time. Notably, most electric-based attacks cause a decent amount of hitlag.
During the hitlag, it is possible to use a technique known as Smash DI, which is where you input a direction during the hitlag, and immediately go in that direction, regardless of the initital knockback direction. It is also possible to perform Multiple Smash DIs, which is best represented in the Perfect Control video on Youtube, at about 2:36, and a slower version at about 3:51, during the credits.
A trivial piece of information is that you can Smash DI even when frozen with the Ice Climber's freeze glitch.
See Also