Vertigo can have many causes. The sense of where your body is generally has three inputs - your eyes, your nerves (ie bottom of your feet when standing) and the inner ear. Then all the inputs get sent to your brain which determines which way is up. Every step can be a failure point (bad eyes, bad peripheral nerves, bad inner ear, bad transmission to brain, problem with the brain.). The diagnosis is complex and if your balance is off gymnastics would be very dangerous.
The inner ear stuff is very interesting.