An ambassador is the highest-ranking representative of a country in another country with which it has diplomatic relations and where it has a mission. The ambassador is the head of this mission, popularly known as the embassy; countries that are members of the Commonwealth and were once part of the British empire, call such missions, high commissions while the mission head is called the high commissioner and not the ambassador.
An Indian mission, for instance, may not be restricted to just the capital city of another country if that country happens to be large and has other major cities where the Indian government would like to have an extension of its mission in the said country.
Hence, the Indian mission in the United States, in addition to the Indian embassy in Washington DC, also has consulates in New York, Chicago, Atlanta, Houston and San Francisco headed by a consul-general in each, all of whom report to the Indian Ambassador to the USA, based in Washington DC.
There are numerous priorities and responsibilities that an ambassador has and the topmost priority is, of course, to uphold and protect his country's national interests in the country where he is posted. The next objective of the ambassador is obviously to promote friendly relations between his country and the country of his posting.
This involves proper handling of all issues with respect to nationals of his country visiting the country of his posting for different reasons. Updating the foreign office in his home country about important events in the country of his posting that are likely to impact relations with his home country and negotiating certain agreements with this country as well as resolving other critical issues that may arise at different points of time.
On other occasions, an enterprising ambassador can play a crucial role in lifting the quality of relations between his own country and the country of his posting, to a different level, which can have a far-reaching impact on geopolitical and strategic relations globally. Of course, there are many other critical functions that ambassadors perform.