One ticket is valid for all public transport within Prague. These include the underground (lines A - Green, B - Yellow, C - Red), trams, buses and even some boat transfers and inner city train lines. You can buy tickets in the underground station or in tobacco shops. Some tram stops have yellow vending machines where you can buy the tickets.