An embassy and a consulate are both government offices located in foreign countries with different functions. An embassy is a diplomatic mission that represents the government of one country in another. It is usually located in the capital city of the host country and is staffed by a team of diplomats who work to promote the interests of their home country in the host country. The ambassador is the head of the embassy and is the primary representative of their government in the host country.
A consulate, on the other hand, is a smaller office that is typically located in a major city of the host country. Its main purpose is to provide consular services to citizens of the home country who are traveling or living abroad. These services may include issuing visas, aiding in emergencies, and helping citizens who have lost their passports or are in legal trouble.