Re: "...Someone explain what a consulate represents. Is the person similar to an ambassador?..."
A consulate under International Law is an official location within a sovereign country, the purpose of which is to represent another sovereign power to its host government.
In so doing its purpose is to provide any and all information and assistance to those wishing to conduct business, trade, or engage in official relations, with the nation and government which it represents.
The actual place of residence/location of a nation's consulate, also known as its embassy, is recognized by International Law as actually being a sovereign land territory of the nation being represented.*
A consul is an official representative of a sovereign nation residing in a host nation, at the will and pleasure of its home government, formally representing its government and nation to that of its hosts, and acting as an official intermediary between its own government and its host government, in all matters of state.
The words diplomat and ambassador are frequently used in conversation interchangeably with consul, although a more exact definition of those terms would be a consul whose job duties are primarily to conduct nation-to-nation diplomacy...serving as an intermediary between their host government and home government in matters of state and official policy.
A modern consulate often has numerous consuls stationed within it, each with specific tasks necessary to complete everything from visa requests, passports, intervening on behalf of its citizens in legal issues encountered in the host government, etc...
Last but not least, it is generally understood as "an open secret", that a modern embassy houses its government's intelligence/spy network and high-tech equipment used to gather information and "spy" on its host government, as well as spy on the activities of other nations and/or individuals living or visiting the host country.
Most of the professional spies working out of foreign embassies have official titles such as consul, pro-consul, etc...as their "cover".
This is why whenever you hear or read in the news that a foreign government denounced the "spies" working undercover from an embassy, or hear a foreign leader "revoke" the diplomatic standing of a guest consul or ambassador, they are usually telling the truth!
And when a sovereign government "recalls" its ambassador home to show its displeasure with a host government, it is considered a sign of extreme displeasure with the host countries policies or official decisions.
*Because a consulate or embassy is recognized as sovereign territory of the guest nation, a foreign national may seek asylum there.
Once inside another nation's embassy and officially granted asylum by its government, the individual in question may not be taken by force or arrested by another country.