Stomach ulcers may be caused by H. Pylori bacterial infections and regular usage of pain relieving medications. In some rare cases, they may be caused as a result of prolonged infectious diseases, surgeries, steroid medications and specific medical conditions.