You can buy a metro or tram ticket from a metro station. In big cities like Rome and Milan, there are physical ticket offices as well as ticket machines in metro stations. These ticket machines usually have the option to use English settings, which might make your purchase a little easier.