Uji is served by both Keihan and JR Railway.
From Kyoto Station, you can go directly to JR Uji Station from the Nara Line. If you are on the Keihan Line, you can transfer to the Uji Line at Chushojima Station. Keihan Uji is probably slightly closer to the sites than the JR Uji Station, but both are very close, so if you are going to see Byodoin Temple, Ujigami Shrine, the Tale of Genji Museum, or the stone pagoda, it doesn't matter which line you take.
If you are going to see Obaku Mampukuji Temple, both lines have their own Obaku Station.
If you are going to Mimurotoji Temple then you will want to take the Keihan Line to Mimurodo Station.
Uji is very easy to get to.
It can be reached by either the JR line (between Kyoto and Nara) or the Keihan line.
The JR line route is straight forward.
Using the Keihan line (running between Yodoyobashi on the Midusuji line in Osaka and Demachiyanagi in Kyoto) get off the train at Chushojima (limited express trains stop here and are the fastest) and change onto the local line - you can use the same ticket. Uji is the 7th stop and takes less than 15 minutes.
It costs 400 yen coming from Osaka and 300 yen (I think!) coming from Kyoto.