To spinjump, press and hold left or right while on the ground and then press jump. If you are not on the ground, do not press jump before hitting the ground. If you are turning while on the ground, wait until the turnaround animation has ended before jumping.
You can buffer spinjumps by pressing and holding jump, then pressing the direction that is opposite to the direction Samus is facing on the ground. This provides the optimal method for departing from nearly every downwards-traveling elevator (Blue Brinstar and Lower Norfair being the exceptions).