Listen to a variety of different beats until one catches your attention or really gets you feeling it. Use this beat as the beat of your song.
Write down the different feelings or thoughts that come to mind when you listen to the beat that you have chosen.
Read through the list of feelings and thoughts that you made. While reading this list, choose those feelings and thoughts mostly closely related to each other or that you are the most passionate about.
Write as many bars as you need to based on the feelings and thoughts that you have grouped together.
Take a break from writing for a short period of time (anywhere from an hour to a day).
Edit the bars that you have written so that they flow with the beat. If you want your hook to rhyme and it doesn't, add rhymes into the end of each bar.