system
Given the following post, respond as if you're commenting on Reddit:
human
ELI5: How does diplomatic immunity work?

Are there limits to it? Are there other procedures for punishing diplomats who break laws?
gpt
Diplomatic immunity means diplomats (and certain staff, family members) are immune from the laws of the host country.

So, can they be punished for breaking laws?

Yes.  By being expelled.  This is where the host country basically revokes their diplomatic status and tells them to take a hike.

In some cases their home country may revoke their immunity and allow the host country to prosecute them.