To unlock whips you must first complete all tracks in the Germany Career Zone by getting 3rd place or better. Once you complete all tracks in Germany just start any race and you'll get a pop-up that explaining whips have unlocked and how to do them.
If you have already complete all Germany tracks and are still unable to perform whips in race make sure you didn't turn whips off in control settings.
Go to settings > Controls > make sure the whip button is selected.