A neck flip is performed during a "race ending crash" - basically you have to clip an object with your head/face and the resulting physics causes your avatar (racer) to "flip"
edit: context clarity
There is no specific "course" or "race mode" you need to be in (would probably be easiest in adventure mode, you could fine tune your approach). Literally all you need to do, is jump/launch into the air, and then before you land, you need to faceplant/smash only your head into some sort of obstacle so that the physics code in the game sends your racer "flipping"
Its just a ragdoll physics mechanism and there are endless opportunities to accomplish this in the game.
One specific thing you will need : you can only accomplish a neck flip
neck flip when using a vehicle that your racer's head is exposed ( Dirtbike / Scooter / Tank / monowheel / etc.. )