Rap occupies a space between speech, spoken word, poetry, and singing. The components of rapping include "content", "flow" (rhythm and rhyme), and "delivery" (how it's spoken or sung). Rapping is distinct from spoken word poetry in that it is performed in time to a beat.
Tell people a story. Let others know what you're about. Hear and watch other artists for inspiration. Keep a notebook. Perform.
What have you been thinking about lately? What have you been observing or hearing about? Come up with a few short lines about it. Don't worry about rhyming yet; just try to capture all of your thoughts.
Try switching up your lines - in what order do they tell the best story or have the most impact? Where can you move things around or use different words to get a rhyme in or improve the rhythm of the sentence?
Start reading what you've written out loud, and work toward speaking in a rhythm and flow. Notice how emphasizing or changing certain words, sounds, and tones affects your work. You might even try beatboxing to get a stronger feel for rhythm.
Try recording yourself and listening to your work. Listen closely for the parts that work well, as well as the parts that you'd like to change, so that you can keep revising and improving.
Find some beats that you like, or create your own. Play them in the background as you rap. Experiment with adding melodies or sampling other pieces of music or sound to create a more complex piece.
Look for opportunities to perform what you've created, as well as to hear others. Start small - maybe just a small group of friends - and work your way up to open mics. Attend freestyle rap battles to hear and see other artists in action.