There are several types of insomnia. Transient insomnia means that you have slept badly for a few days. With short-term insomnia, it's gone on for up to three weeks. Chronic insomnia means poor sleep has bothered you for months. Other causes are the evening consumption of colas, coffee, tea or alcohol.
Stress also plays a big part in the problem as can a lack of regular exercise.
Deal with worries before bedtime. You may fret less and sleep better. Decide on the amount of sleep you need. . . and work hard to be consistent. Don't spend too much time in bed. . . Have a healthy snack before bedtime. . .