There can be several different causes for insomnia, so it's important to find out what's the cause in your case. As you don't just have it for a couple of days (which wouldn't be that alarming), but suffering for several weeks, you should really try to find a physician who is a specialist for sleeping disorders. Don't just go for a new box of sleeping pills. Those are fine if it's just a short temporary circumstance, but in long term usage can be addictive and make your sleeping disorder even worse.
What you can try yourself is anything that would relax you, like having a hot bath before going to sleep, autosuggestion/relaxation exercises, listening to quiet music etc. In the two hours before going to sleep you should not: drink any alcohol, eat heavy, watch TV, surf the Internet or have any bright light exposure to your eyes. You can do sports in the afternoon/evening so your body gets tired, but also not in the two hours before going to sleep. So making the two hours before going to sleep really a time for coming down, physically and mentally.
If you wake up in the night and can't fall asleep again read a book if you have a troubled mind. If you have lots of thoughts, write them down with a pencil on paper (not on the computer) as notes, not to elaborated. So you sort of get rid of the thought and can think about them the next day at daytime.
If all that doesn't make your situation better in about a week, really go and look for a specialist. If it's a permanent problem it can become dangerous.