Although this is a classic intro this trick can also be used
within a tune - usually at the end of a turnaround.
In a piece in the key of E this would typically link from a B ( or B7 ) chord back to the root chord E ( or Em )
It covers 2 beats more or less so the way to play it is to come in with it on beat 3 of your B chord and then time the slide down the neck so that the last note ( the open E )comes right on the bar line as the chord changes to E.
To get this going I suggest you start by tremolo picking at the 17th fret - once you have a solid tremolo working then practice the slide down the neck.
Try to make the slide as even as possible and aim to get to about fret 3 before pulling the finger off to get the open E.
If you want to use this in the key of A simply move the whole thing over to the 5th string.