There is only one embassy in a given country and it is located in the capital city, whereas there could be many consulates – typically not in the capital city.
The embassy is where the official diplomats perform their duties and interact with their official counterparts in the host country. However embassies have many functions other than diplomatic relations. For instance – passport and visa processing or other services provided to the relevant foreign nationals. Since travelers may not physically be in the capital city, consulates can fill these functions.
Washington D.C has an embassy for probably every nation with which the U.S. has diplomatic relations. Of those countries, 108 also have consulates in New York City (and I’d imagine on the west coast as well) and most likely much of that is due to the fact that the United Nations is in NYC.
A permanent diplomatic mission is typically known as an embassy, and the person in charge of the mission is known as an ambassador. The term “embassy” is often used to refer to the building or compound housing an ambassador’s offices and staff.
A consulate is similar to (but not the same as) a diplomatic office, but with focus on dealing with individual persons and businesses, as defined by the Vienna Convention on Consular Relations. A consulate or consulate general is generally a representative of the embassy in locales outside of the capital city. For instance, the United Kingdom has its Embassy of the United Kingdom in Washington, D.C., but also maintains seven consulates-general and four consulates elsewhere in the US. The person in charge of a consulate or consulate-general is known as a consul or consul-general, respectively.