First, it is important to address the possible causes of insomnia. These range from medical to psychiatric conditions. Common medical causes include physical pain and or sleep disorders. Some psychiatric conditions include depression and anxiety (https://sleepfoundation.org).
There is no cure for insomnia. However, identifying the underlying cause allows the insomniac to learn how to treat it. Keeping a sleep diary is frequently used to help recognize insomnia-inducing conditions and habits. An important step in overcoming insomnia is establishing new sleep habits and a better bedtime routine.
Often times, a person experiences difficulty sleeping simply because their brain is classically conditioned to stay up late. Therefore, it is important to establish a healthy sleeping schedule, and stick to it. Naps, caffeine, and artificial light are all factors that throw off sleep patterns (http://www.helpguide.org/articles/sleep/cant-sleep-insomnia-treatment.htm).