Insomnia can be caused by physical or psychological reasons. And it's important to overcome it as fast as possible.
Psychological causes are usually depression, stress and anxiety.
Physical causes are usually low levels of melatonin, for women hormonal changes, discomfort or pain and more
Very often insomnia can be in genes, if your family has that problem, you may become sufferer as well. This is not scientifically proven, but it seems like it does run through genes.