You probably don't have insomnia. You probably have what is referred to as poor sleep hygiene. I will now bombard you with information to help you.
-Maintain a proper sleep schedule. Go to bed around the same time every night, try to get up around the same time.
-Determine how much sleep you need to feel rested; usually 7-9 hours.
-Don't look at computer/television screens (and blue lights in general) for at least 30 minutes before you go to bed.
-If you're in bed for 20-25 minutes trying to sleep and still can't, get up and do something quiet and relaxing for a bit; reading, for example.
-When you're in bed, try to clear your mind and relax; worrying or allowing your thoughts to race are counterproductive.
-Engage in physical activity during the day, and try to expose yourself to sunlight.
-Avoid ingesting substances that will interfere with your wakefulness (e.g. caffeine), and don't eat large meals or drink alcohol right before bed.
-Finally, your bed is (mostly) for sleep, and you should treat it as such; making proper associations can help you to sleep. Don't do work in your bed; don't watch movies in your bed; don't mess around on your laptop/tablet/whatever in bed. Make your bedroom quiet and dark prior to sleep. Having a decent bed doesn't hurt, either.
If after having taken all these steps you find that you still cannot sleep or cannot get regular, quality sleep, you might have a bigger problem. Good luck, sucks not to sleep well.