In general, a NOC is a letter indicating the writer of the letter has no objection to the terms contained within said letter. Sounds very meta, but basically it's like saying 'I have no objection to what I'm writing about, and this is legal evidence stating so.'
Now why would that be useful? Let's take a common example.
A government employee wishes to take leave from his job and travel to the a certain country A from country B. To prove that he's able to leave his job temporarily, his department may issues a NOC to indicate that they're ok with him leaving for his 6 month holiday (which may raise questions in other cases due to its length) and that they're covering his leave. If he's a government employee, they may also issue a NOC to indicate that they're ok with him being issued a passport.
NOCs are also common in business. for example.
In this case,
given the status of diplomats and the political impact they can have when travelling, and given their immunity status as well, it's often in a government's best interest to require NOCs to make sure that the home government of country B knows that the diplomat is travelling to country A, and that they're legally stating they're ok with what he's doing there. This also prevents country B from later claiming they had no knowledge of their diplomat's actions.
In highly politically-charged areas like Kashmir, it stands to reason that concern be even greater about tracking, noting and stating the intent of political activities, diplomats and emissaries.
However, Joe Tourist on the other hand, is usually not such a problem to countries. Of course, any concern or suspicion on their part would be nullified with an NOC, especially one from your employer stating that they, for example, know you're on holiday and are expected back at work in a few weeks.