As Zanzibar is a part of the United Republic of Tanzania you can use a Tanzanian tourist visa for entering to Zanzibar too. While you won’t need a different visa, you need to bring your passport to be checked upon arrival.
There are few countries that don’t need to obtain a Tanzanian visa to enter the country as well as there are few nationalities who can obtain a visa upon their arrival to any of the international airports of Tanzania.
For most of the nationalities including the UK and Australia, the single entry visa costs around $50 where citizens of the US need to pay $100 for the visa. It’s recommended to obtain a Tanzanian visa prior to entering the country.