Diplomatic immunity is a principle of international law that grants foreign diplomats protection from legal action in the host country, allowing them to perform their duties without fear of coercion or harassment. This immunity is not absolute and can be waived by the diplomat's home country, ensuring accountability while maintaining diplomatic relations.