Where does reverse transcriptase come from?
I was about to write an answer saying that all reverse transcriptases are viral genes/proteins, but then wikipedia reminded that the telomerase is technically also a reverse transcriptase.  

To answer your (main?) question:


  I can't figure out whether the viruses provide reverse transcriptase or their RNA has the code for it


Retroviruses have (almost by definition) the code for a reverse transcriptase in their genome. However, they also have the enzyme (or rather an inactive pro-enzyme) packaged into the viral capsid. The reverse transcriptase is a part of the Pol gene.
There are some other viruses that also use reverse transcription, but aren't retroviruses - in these cases I'm not sure, but I would guess that they also have an RT in their genome.

Now going back to the telomerase and retro-transposon elemnts:

These are ancient genes/elements in the eukaryotic genome, that basically do the same thing as viral reverse transcriptases: they make DNA from RNA.
Retro-transposons are generally believed to be viral additions to the genome, collected over the course of evolution. However, also the Telomerase enzyme probably has one common origin with viral reverse transcriptases (Nakamura 1998, take a loot at figure 2 at the end), (Witzany 2008). The thing about these evolutionary events is that they go way back, up the point were eukaroytes just started evolving from ... something. The sources I cited argue that many "eukaroytic" features (e.g. nucleus, RNA processing, vesicular transport) were originally taken from viruses.