I usually pick it up, and "hear" a riff, melody or chord in my head, and pick them out. I'll play it repeatedly until I can imagine how it will be accompanied and where it will go. I know alot of people just use trial and error, and it will work for them. Because I make my living as a guitar teacher, my hands will fall into routines. The best way to break them is to envision it first, then play it.
Jeff