Varies. Nonsteroidal anti-inflammatory agents (nsaids) are effective pain medications which exert their effect by decreasing inflammation. They all affect stomach lining and other organs. Higher dose and duration of treatment increase risk. Those with pre-existing stomach illness, elderly, etc. Are at higher risk. Combination with some other medications or alcohol increase risk as well.
It can happen. NSAIDs reduce the protective lining in the stomach. Long-term, high doses can lead to ulceration and possible bleeding (which is dangerous), so the question becomes what the reason is for chronic use and whether you’re keeping your doc in the loop. If you need NSAIDs over a long period of time, coordinate with your doc to be sure you’re protected.