The best way to get to Taksim Square is via the M2 metro line. Get to the M2 metro line and get off at the “Taksim” station. The moment you go out you will be in the middle of square.
If you stay in the old town area (Sultanahmet, Beyazıt, Karaköy, Eminönü, etc) you can go to the last station of the T1 tram line, which is “Kabataş”, and then transfer to F1 funicular line from Kabataş straight to the Taksim.
Read our article on why you should visit the Taksim
Read our article on Top 10 Taksim Square Tips: Read this before you go