Zanzibar is a group of islands and is part of Tanzania. The conjoined states became (in 1964) the United Republic of Tanzania. Zanzibar is a semi-autonomous within the union, with its own government. The islands have their own elected administration and taxes. Zanzibar has a president; so does Tanzania. Zanzibaris are Tanzanian nationals.
Zanzibar is a partly self-governing state in Tanzania. The army that defends it is the Tanzanian Army.
You can visit Zanzibar with the same visa you need for Tanzania. Are you considering a holiday to Zanzibar? Have a look here at our Tanzania Zanzibar itinerary.