A lead guitar is a guitar part which plays melody lines, instrumental fill passages, guitar solos, and occasionally, some riffs within a song structure. The lead is the featured guitar, which usually plays single-note-based lines or double-stops.  In rock, heavy metal, blues, jazz, punk, fusion, some pop, and other music styles, lead guitar lines are usually supported by a second guitarist who plays rhythm guitar, which consists of accompaniment chords and riffs.
Creating lead guitar lines
To create lead guitar lines, guitarists use scales, modes, arpeggios, licks, and riffs that are performed using a variety of techniques.  In rock, heavy metal, blues, jazz and fusion bands and some pop contexts as well as others, lead guitar lines often employ alternate picking, sweep picking, economy picking and legato (e.g., hammer ons, pull offs), which are used to maximize the speed of their solos or riffs. Such "tricks" can employ the picking hand used in the fret area (such as tapping), and even be augmented and embellished with devices such as bows, or separate electronic devices such as an EBow (electronic bow).
Some even like to play with their teeth or feet or other bodily appendages or the like, this is normally used as a performance technique in order to impress spectators. In a blues context, as well as others, lead guitar lines are created using call and response -style riffs that are embellished with string bending, vibrato, and slides.
Jazz guitar soloing
Jazz guitarists integrate the basic building blocks of scales and arpeggio patterns into balanced rhythmic and melodic phrases that make up a cohesive solo. Jazz guitarists often try to imbue their melodic phrasing with the sense of natural breathing and legato phrasing used by horn players such as saxophone players. As well, a jazz guitarists' solo improvisations have to have a rhythmic drive and "timefeel" that creates a sense of " swing " and "groove." The most experienced jazz guitarists learn to play with different "timefeels" such as playing "ahead of the beat" or "behind the beat," to create or release tension.
Another aspect of the jazz guitar style is the use of stylistically appropriate ornaments, such as grace notes, slides, and muted notes. Each subgenre or era of jazz has different ornaments that are part of the style of that subgenre or era. Jazz guitarists usually learn the appropriate ornamenting styles by listening to prominent recordings from a given style or jazz era. Some jazz guitarists also borrow ornamentation techniques from other jazz instruments, such as Wes Montgomery's borrowing of playing melodies in parallel octaves, which is a jazz piano technique. Jazz guitarists also have to learn how to add in passing tones, use "guide tones" and chord tones from the chord progression to structure their improvisations.
In the 1970s and 1980s, with jazz-rock fusion guitar playing, jazz guitarists incorporated rock guitar soloing approaches, such as riff -based soloing and usage of pentatonic and blues scale patterns. Some guitarists used Jimi Hendrix -influenced distortion and wah-wah effects to get a sustained, heavy tone, or even used rapid-fire guitar shredding techniques, such as tapping and tremolo bar bending. Guitarist Al Di Meola, who started his career with Return to Forever in 1974, was one of the first guitarists to perform in a " shred " style, a technique later used in rock and heavy metal playing. Di Meola used alternate-picking to perform very rapid sequences of notes in his solos.
When jazz guitar players improvise, they use the scales, modes, and arpeggios associated with the chords in a tune's chord progression. The approach to improvising has changed since the earliest eras of jazz guitar. During the Swing era, many soloists improvised "by ear" by embellishing the melody with ornaments and passing notes. However, during the bebop era, the rapid tempo and complicated chord progressions made it increasingly harder to play "by ear." Along with other improvisers, such as saxes and piano players, bebop-era jazz guitarists began to improvise over the chord changes using scales (whole tone scale, chromatic scale, etc.) and arpeggios.  Jazz guitar players tend to improvise around chord/scale relationships, rather than reworking the melody, possibly due to their familiarity with chords resulting from their comping role. A source of melodic ideas for improvisation is transcribing improvised solos from recordings. This provides jazz guitarists with a source of "licks", melodic phrases and ideas they incorporate either intact or in variations, and is an established way of learning from the previous generations of players
Role in a band
In a band with two guitars, there can be a logical division between lead and rhythm guitars and although that division may be unclear.  Two guitarists may perform as a guitar tandem, and trade off the lead guitar and rhythm guitar roles. Alternatively, two or more guitarists can share the lead and rhythm roles throughout the show, or both guitarists can play the same role ("dual lead guitars" or "dual rhythm guitars"). Often several guitarists playing individual notes may create chord patterns while mixing these "harmonies" with mixed unison passages creating unique sound effects with sound altering electronic special effects such as doublers or a " chorus " effect that over-pronounce the lead significantly sometimes to cut through to be heard in loud shows or throw its sound aesthetically both acoustically or electronically.
Effects and equipment
In rock, heavy metal, blues, jazz and fusion bands and some pop contexts as well as others, the lead guitar line often involves melodies (as well as power chords from the rhythm guitars) with a sustained, singing tone. To create this tone on the electric guitar, guitarists often select certain pickups and use electronic effects such as effects pedals and distortion pedals, or sound compressors, or doubler effects for a more sustained tone, and delay effects or an electronic "chorus" effect as well as electronic reverb and echo for a reverberant sound.
To attain this prized sustain effect tube amplifiers such as Marshall are often utilized.  The desired effect, springs basically from where the tubes, when pushed to high volumes reach their peak and no further which has an effect of attenuating the attack portions of the signal while presenting the trailing portions of the signal (which are normally progressively quieter) at the same volume as that peak output portions mimicking compressor/ limiter electronic effects.
Simultaneous to this, the distortion can actually distort itself in fidelity of its production adding a smooth "creamy" effect to distortion when as well the resolution of the usually gritty distortion sound is compromised and the note will almost return to its original configuration plus the desired "sloping" effects. These are aesthetically pleasing to many guitar players and sometimes violin and keyboard players as well.
High gain is also used to induce audio feedback, which increases sustain dramatically. Sometimes, if done correctly by holding the guitar pickups at precise distances from the amplifier speakers such can present a steady, undecaying sound. Electronic special effects employing effects loops can artificially reproduce this as well. Other effects used to embellish lead guitar tone and pitch include the whammy bar which physically stretches the strings, slides used extensively in country music and wah-wah and univibe effects. Also very commonly used are hammer-ons and pull-offs.