For Indian Nationals: Usually only “Post-Paid” SIM cards are working in Kashmir.
For foreigners: You will be able to use a foreign SIM-card in Delhi and other places of India (with the specific roaming charges), but NOT in Jammu & Kashmir. Even Indian pre-paid SIM-cards do not work here.
Some providers like Jio and Airtel may be able to provide you with an official “Tourist-SIM Card”. If you want to purchase one, go to an official store of one of these providers and ask if they have a tourist-SIM available. You will definitely need your original passport/visa and a copy of each, and you may also need a passport photograph. Expect it to take some time until the SIM gets activated.
The best way for foreigners to communicate is by connecting to wifi in the hotel or other places.