So, you need to go to toilet when you are at Tanah Lot Temple or Kintamani? No problem. Toilets are available almonst everywhere in popular tourist areas. Just need to prepare to pay for the "service" you get in the toilet and choose the most "suitable" one for you.
In public places, the toilets are not as clean and maintained as those in the 5 star hotels. Once when tour guiding in Bali , my clients asked me if they could go to public toilet. Why, sure, and I pointed at the public toilet.
They had a look inside it, and decided to just wait until they found a decent toilet. It was dirty and it's what you refer as hole-in-the-ground kind of toilet. Furthermore, paying to go to toilet is just something they felt as "against the human right".
Yes, you need to pay to use the toilet. Different charge for different service. Outside the toilet by the door, you will see a box on where you can put the money in. Usually a person sit buy on the chair guarding the toilet to monitor if somebody sneak into the toilet and get away without paying. It is "illegal" to to use a toilet without paying the proper price.
What is the charge? Not much. You need some small note, by small note I mean, one thousand Rupiah and no bargaining. (That is the smallest note we got here in our paradise island. It equals to 12 cents USD.) It depends on what you are going to do in the toilet, the charge may differ. Look at the photo I have taken form my cell phone to "consult" with the price.
A word of warning: the toilet in Bali is what you refer to a "hole in the ground" instead of sitting toilet. In some areas, as the time of writing, has a smell which cause even flies to turn away. Note: The toilet charge is tax free. Ask your tour guide to get you a decent toilet, or wait until you arrive at your hotel.