The role of such a mission is to protect in the receiving State the interests of the sending State and of its nationals, within the limits permitted by international law; negotiating with the Government of the receiving State as directed by the sending State; ascertaining by lawful means conditions and developments in the receiving State, and reporting thereon to the Government of the sending State; promoting friendly relations between the sending State and the receiving State, and developing their economic, cultural and scientific relations.
The rights and immunities (such as diplomatic immunity) of diplomats are codified in the Vienna Convention on Diplomatic Relations.
In the UK a Diplomatic Mission is defined as the office of a country's diplomatic representatives in the capital city of another country. A Diplomatic Mission in another Commonwealth country is called a High Commission. The head of mission is called High Commissioner. A Diplomatic Mission in any non-Commonwealth country is called an Embassy and the head of mission is called Ambassador.
A Consular Mission is also an office but undertakes a more restricted range of duties as defined by the Vienna Convention on Consular Relations.