I have no idea what to play over a chord progression. I know my scales but I don't want to play scales up and down. How do I get licks ideas?
At the risk of sounding glib: why do you need to play a lick?
What's the point?
If can give some kind of answer to that question, you should have the starting point for figuring out what to do.
If you have a chord progression, you already have pitches and some relative pitch changes (voice leading.) That gives you a kind of prototype melodic material to work with. From this perspective a lot of your pitch material is set... so look to other musical elements or devices.
You can embellish the basic melodic skeleton. Of course that will introduce a bunch of new, subordinate pitch material, but I think more importantly it will necessitate something else: adding rhythm...
...I don't want to play scales up and down...
That is probably a very good impulse. Licks are not just going up and down the scale.
Think rhythmically, think articulation. Play with small groups of notes. Try contrasting groupings like 3 pitches in a rhythm of 4, or 2 pitches in a rhythm of 3 (sort like polyrhythms.) Try rhythmic variation before moving to new pitches. Explore articulations like playing a note straight and then bending up into it. Don't be afraid to repeat notes. You don't need to fly all over the fretboard to make a tasty lick.
That's a sort of musical fundamentals approach to think about licks. But also consider questions like what's the difference (if any) between a melody and a riff? How are phrases designed? Does the lick related to some other aspect of the song?
Playing scales over chords that match is one method of generating ideas and one that is taught in some jazz improv methods. It is not very "musical" but theoretically correct and for some it helps tune the ear to hear chord tones and passing tones relative to the progression. It is not a bad idea to warm up this way.
A "lick" is a musical idea or motif. While it may be true that licks can be found in scales one rarely thinks about the scales they are in when they play a lick. The lick becomes the kernel of a musical idea, rather that the notes that make it. I think that this is an important idea that is overlooked. If you analyze the solos of some musicians you will no doubt discover that they fit on scales that match chords (with occasional chromatic passing tones...) etc. But if you listen to those solos, and really listen, you start to hear multiple occurrences of the same melody line that might be 4 measure long. Now you've discovered the motif used by that soloist, their own musical language.
Quite frankly sometimes these motifs are "forced" over the changes even when they are out (don't quite fit). Jerry Coker has a book called Improvising Jazz that discusses the many ways that we approach this and recommends the "Lick based" or "motif based" approach. He recommends keeping a diary of licks that you created or figured out by listening to other players. You uses these as the foundation of solo ideas, experimenting with them over different chords and progressions. This is very freeing. Even though his book focuses on Jazz the idea works for any genre of music.
To my last sentence of the previous paragraph I will add that what makes Jazz sound Jazzy and Metal sound Metallic, etc, is "culture". You need to immerse yourself in the cultural history of the music you like to get ideas that are consistent with that style. This is the best way to learn music and to get ideas. If you like Jazz then try and figure out a Wes Montgomery or Pat Martino solo (or someone more recent). If it's Blues then listen to Buddy Guy, B B King, Robert Cray, etc. And transcribe something, anything. They are all playing the same set of motifs (at least as a starting point).
A 'lick' is just scale notes in a 'random' order. By random I mean not merely going up and down through a scale. It could actually be completely random - using scale notes, of course, and sometimes - serendipity - something good comes out!
A solid start note is 1 in whatever scale. Say you're in key A, and on a bar of E. That E note on the 1st beat always sounds good - one on one.Other good notes are other chord tones. On that E bar again, a 3 and a 5 will match exactly to that chord. So G♯ and B. Other notes in between can be (and often are) used. I call them 'stepping stones', and their best places are the non accented parts of bars, like anything not on beats 1 and 3.
That's a very basic start point. Another is to listen and copy what others have done. And realise that often, a 'motif' is repeated, to fit with another couple of bars on other chords, either note-wise or rhythm-wise.
Transcribe what other musicians have done over the same chord changes. When they play something you like, learn it, and practice playing it over that chord progression (transposed to all 12 keys).
To begin developing your own licks, play one (held) note per chord, but make a point of moving smoothly (stepwise) from one chord to the next. This will help you develop a sense of melody moving across chords. As you grow more proficient, move to two notes per chord, and so forth.
Take a familiar melody and modify/recompose it to play over the chord progression you're practicing.
Here are some ideas for you to play with:
As mentioned by ggcg in his excellent answer, target the chord tones, especially on the strong beats. This will give your "licks" a sense of purpose (they are played at the right time, not just at random). In particular, target the 3rd tone (and the 7th if you're playing tetrads). They tend to define the chord in a very unique way.
Having said that, don't just play chord tones. Add some passing notes. Otherwise your lick will not add anything over the harmony and it will feel hollow and soulless (I'm sure there's a better, technical word for what I'm trying to say).
Related to the above: often, chords in the same key will share notes. When you change chords, play a lick that includes some common notes and highlight the difference. Let's take a change from C - Am. Those 2 chords share the notes E and C. You could play a phrase that goes: E - B - C - G (over C major) x2 and move to E - B - C - A (when you change to A minor). You've just highlighted the chord change. (make sure B has a short duration because it's not a chord tone of either).
Once you have a target note in mind, play a phrase around it. For instance, if you're in G and targeting C, don't just play G - A - B - C. That's a scale. Think going "around" your target note like G - B - D - C. This may sound analytical, but it's up to you to experiment with.
Think expressivity. Depending on the genre, using resources like bends, hammer-ons and pull offs is essential to creating an expressive licks. A very classic rock riff involves bending the 4th tone up to the 5th tone, and then playing the 5th on the next string. It's a very simple lick but works wonders because of the expressivity of the bend. Other expressive techniques involve muting and playing with dynamics (volume).
Try double stops. Add 2 notes played at once sometime in your lick, for greater emphasis
Mixing both above: try unison bends. For instance, play a high E on the 12th fret, 1st string and a D on the 15th fret, 2nd string simultaneously, then bend the D up 1 tone to make it an E. That's a nice resource that you might have heard in some songs.
Highlight the chord change by playing double stops. For instance, play G and C over C major, moving to A and C over Am.
To "break free" from scales, try string skipping. In practical terms, this generally means using interval of 6ths, 7ths or 8ths. For instance, if you're playing an A on the 3rd string, jump to a G on the 1st string
Try "call and response": create a phrase, wait for some dramatic effect, and answer yourself with another lick
If you're playing major blues only: mix major and minor phrases. For instance, make a "call" in a major scale and a "response" in a minor scale. (Again, this applies mostly to blues and blues-influenced music. Not sure this will work in jazz or country, for instance).
If you're a pentatonic player: add some colour notes for extra flavour. This will move you out of the pentatonic and into one of the diatonic modes. For instance, if you're playing pentatonic minor, add a 6th. If you add a minor 6th, you'll get an Aeolian feel, but if you add a major 6th you get a Dorian feel (happier). Which one will you choose? Same thing with the 2nd: a minor 2nd will sound Phrygian (flamenco-like). You can solo using just the pentatonic to great effect (listen to SRV's "Tin Pan Alley" for that), but adding colour notes and breaking free of the pentatonic will add richness to your lick
As mentioned in other answers, listen to the players you like, transcribe their solos, or perhaps get some transcriptions. It's OK to read transcriptions, as long as you don't just do it mechanically but think about what resources the musician is using. Enjoy!
I'm just going to describe my own experience with learning to improvise and solo over chords. First I learned my scales, that's basic, and somewhat limited. Then I discovered a term called melodic patterns in a guitar book for jazz players. These were exercises that I practiced until I had them well established in my brain. At that point I noticed I could listen to a piece of music and I could hear places that those melodic patterns would fit. I also studied chord progressions and learned how to use common tones and leading tones that exist between one chord and another and I use this knowledge to move smoothly from harmonizing my improvized lead part to the chord progression I'm working with. Incidently, I don't play jazz, but I found this treasure trove of melodic patterns very valuable.
Use greek modes
If possible, remove the 3rd from the chord progression so you can play greek modes more freely
Consider making each chord duration as long as you can, so you have enough time to play different scales at the same chord before it changes
Add chromatic notes here and there once in a while