What is the primary purpose of a visa?
A) To provide permanent residency in a country
B) To grant permission for temporary travel or stay in a foreign country
C) To allow unrestricted access to all countries without restrictions
D) To serve as a substitute for a passport