from what I read. it depends.
You could have been born with it...
but in my case, it's caused by mental "shock" (I think I got it from depression or something.)
Insomnia is like a habit as well.
It is defined as "Not willing to or unable to sleep." if you put it simple.
In my case, I am unable to sleep.
People who are unwilling to sleep are probably most of the college students who have tons of classes and works.
Opposite of Insomnia is Hypersomnia, which is pretty much "Feeling of Restlessness or unable to fully wake up."
These kind of disorders can be found common among Korean, Japanese, and Chinese high school students because the lack sleep(from studying... I heard they sleep for about 5 hours at most), but that is different type *Parasomnia called "Sleep-wake disorder."
This is just like how you read it. I think of this as "Messed up sleeping time schedule" because it is mainly caused by sleeping so little(insomnia)/too much(Hypersomnia).
*Parasomnia is pretty much how you say "Sleeping disorder" in a fancier way.