Usually I'll have either a melody, a riff, or a chord progression idea that I like and I'll just improvise around until I come up with something else I like.
Any of you interested in the creative process might want to check out "On Writing" by Stephen King..great book.
http://www.nicklayton.com