A consulate is a small diplomatic office of one country in another country. If the first country has an ambassador in the other country, the main diplomatic office, located in the capital city is called an Embassy and in this situation, any consulates would be located in other large towns and cities. However if there is no embassy, the consulate could be in the capital city. Consulates usually do not perform all of the functions of an embassy.
Some larger and more important countries might also have Consulates General. These are simply bigger consulates which might do more than a smaller consulate.
People who work in any sort of consulates are called consular officers. The person in charge is called a consul, or consul general. An honorary consul does not work full-time for the government. They are usually in port towns, to speed up issuing documents for trade. An honorary consul might be a citizen of the country he works for, or have another link such as parents or grandparents, or they may have married someone from there. They usually work in an office, which is considered an honorary consulate.
Consular officers have diplomatic immunity.