I was a lifelong insomniac. When I overcame my problem, I was encouraged by many to write my plan so others could read it. We've got some good questions from the audience, so let's get to those. It seems like the answer is very different for many people. I have very good luck with hot baths.
Many people resort to medications with varying degrees of success.
Many of the medications have very strong side effects. I would recommend experimenting as much as possible with alternative methods before giving in to medications. Amidalah I have heard that it helps to keep a journal of your sleep habits. I think a sleep diary is very effective. Alcohol, caffeine, tobacco, eating.