This is a far more complicated question than you probably think it.
"How do I make a note last longer?"
What you're asking about is called sustain, as in, "how long can I sustain this note?"
There are two fundamental parts to this. The first is "How do I keep the string vibrating for as long as possible?" There are natural and artificial ways of doing this.
NATURAL: Proper setup, allowing for the string to have the least contact between fretted spot and bridge. This includes string height, neck bow, and pickup height, and the mass and density of the wood of the guitar (part of why people love Les Pauls). It also includes things like holding the string down with just the right amount of pressure, and also adding some finger vibrato. These methods all eventually fade out.
ARTIFICIAL: Syn's own Sustainiac (or the handheld version, an eBow), which uses a close-range electromagnetic field to make things (ALL THINGS) vibrate. And the "feedback loop," which you can see when the raging metal axe-slinger stands in front of a giant stack of speakers, using the vibrations generated by their own guitar coming through the speakers to make the string keep vibrating. These methods can all be maintained continuously for, really, about as long as you want, but they also require that you actively mute ANYTHING you don't want to make noise.
The second fundamental part is "how do I keep HEARING it, even when it gets quieter," and that is where the magic of COMPRESSION comes in. Compression comes in many forms for guitarists, but the most common is part of gain staging or "distortion." Yes, that same circuitry and tubes that makes a guitar CRUNCH and CHUG makes heavy use of compression. How? The way gain works is to amplify things to radical degrees so they overload the circuits, tubes or valves until the sound distorts, and then it compresses, clips, or limits them back down to a useful level. That's why the artificial harmonics that chime on a clean tone scream and squeal in a high-gain tone - they've been amplified along with everything else, and then squished down to the same usable level.
Alternately, with clean or low-gain tones, you can also use a compressor pedal or effect to achieve the same end without the whole screaming part.
If you provide more details about exactly what you're using and what you're trying to accomplish, I can give a more specific answer.