Some of what is above is not true or unhelpful. Lots of people get told they have an inner ear infection or labyrinthitis, when really there is no evidence to prove it.
All sorts of causes – diagnosis easier if you have had it more than once.
Commonest cause is BPPV but really you need a proper history taken and examination.
Key questions:
Have you had hearing loss and/or tinnitus?
Is it worse when you lie on one particular side?
Have you been to the dentist/hairdresser/had your head leant over backwards for a prolonged period recently?
Have you been on a boat at sea recently?
Are you on any new medication?
Any other neurological features?
But then you need someone to look in your ears, check coordination, do a Dix-Hallpike test etc etc etc
So see a Doc.