More than twenty years as an occasional player didn't see any advancement in my abilities. It's only in the past six years, since I've started playing "seriously" that I've made noticeable progress in both technique and creativity. Here are some notes about my own progress; perhaps they'll help you as well.
There's a natural progression, I think, to developing your own musical voice. That progression begins with learning and playing other people's material. There's nothing wrong with playing cover songs. Playing covers does not have to be your final destination.
Take the opportunity to learn the music that interests you. As you become more comfortable, take some liberties with what you've learned and pay attention to what happens. When you hear something you like, stop and play it again. And again and again... until it's in your fingers.
Also, keep something handy -- a recorder or a pad of paper -- to help you remember what you've discovered. Without this you can easily forget more than you've learned.
As you keep doing this you'll find that you're playing more and more music that belongs to you.
All of this takes time and persistence. It doesn't happen overnight. You'll probably find that you have days where you can do no wrong followed by weeks where you feel like you're covering the same old ground. This is perfectly normal. Push through it.
The folks who can "play what they hear" started out the same way the rest of us did. It's something you learn gradually by constantly pushing yourself to hear (and play) new things while still hanging onto (through practice and repetition) the stuff that you already know.
The players who "spontaneously" rip out great lines are drawing from a deep pool of music that they already know -- music that they've developed over a long period of pushing their own boundaries to develop themes and motifs that belong to them.
I heard jazz guitarist John Pisano at a clinic tonight. He spoke of similar things: developing one's own "musical vocabulary" and learning how to play from that vocabulary. Other guitarists have similar approaches. It all comes down to practicing, listening, following your own vision, and remembering what you've learned in order to expand your base of knowledge and technique.