Turning around is a universal animation that allows characters to change their direction. All characters have at least two kinds of turning animations: regular turnaround (called Turn in Melee's debug mode) and run turnaround (called TurnRun in Melee's debug mode).
In Smash 64
The standing turn animation lasts for 11 frames, but can be acted out of on frame 6. Shielding, grabbing, jumping (and therefore up smashing) will cancel the turn and be performed immediately, all other moves will be buffered and performed on frame 6. However, when inputting attacks that require a direction (tilts, up-B attacks, etc.) the direction must be held until frame 6, or the attack will occur without the direction. For example, inputting a down-tilt on frame 2 of a turn will result in a jab if down isn't held until frame 6.
Turn in general
Turning around can be triggered at the end of all grounded moves, during neutral stand and during dash (smash turn only). The turn animation has a total length of 11 frames for all characters. Most moves are available during all 11 frames, but there are a few exceptions:
A smash turn is a turn that is triggered by holding strong backward (referred to as a smash input from now on). For turns to the left, the control stick x value range (y is assumed to be neutral at 0, minor variations don't make a difference) is -1.0 to -0.8. For turns to the right, it's 0.8 to 1.0. If the smash input is still present after the first frame of Turn, a dash is triggered. If the x value changes to the middle section (-0.78 to 0.78), the Turn animation will continue without another opportunity to dash until its 11 frames have passed.
Smash turns turn the character around on frame 1. For example, if a player controlling Fox makes him stand in his Wait animation facing right, holds strong left (smash input to the left) for 1 frame and then presses a jump button on the next frame, Fox will jump facing left.
A tilt turn is a turn that is triggered by holding weak backward (referred to as a tilt input from now on). For turns to the left, the control stick x value range (y is assumed to be neutral at 0, minor variations don't make a difference) is -0.78 to -0.28. For turns to the right, it's 0.28 to 0.78. If by Turn 2 smash input levels were detected, after Turn 5-9, the control stick is read again. If a smash input in the turn direction is active, a dash is started on the next frame. That is true even when the stick is constantly held until then. (Usually, dash inputs are only active for three frames and then only trigger walking and tilting; here they can be active for up to 8 frames (for DK and Bowser, see list below).)
Tilt turns turn the character around on frame 5-9 (depending on character). For example, if a player controlling Fox stands in his Wait animation facing right, holds weak left (tilt input to the left) for 1-4 frames and then presses a jump button on the frame afterwards, he will jump facing right. If he holds weak left for 5 frames and then presses a jump button on the frame afterwards, he will jump facing left. This direction reverting also applies for shielding and sliding off from a platform, but not for doing any kind of attack.