As mentioned earlier, peptic ulcers are caused by the bacteria Helicobacter pylori. This bacteria can only be found in the acidic environment of your stomach or in the first part of your small intestine (doudenum). Hp can cause inflammation and ulcers in this tissue, but most often it does no harm. The risk of ulcers will remain as long as this bacteria is found in your stomach. This risk will be enhanced by smoking.
An acidic environment is nessesary to develop peptic ulcers, but those who develop the condition does not need to have a higher level of acid production than healty people. Despite of this fact, medicin that reduce the level of acid in your stomach can reduce the symptoms from your ulcer, but they can only ease the discomfort - they can not eradicate the infection and avoid future recurrence of the peptic ulcer. These drugs are called antacids, H2 antagonists or proton pump inhibitors (PPI)
Ulcers can also be caused or worsened by drugs such as Aspirin and other NSAIDs. About 25% of the stomach ulcers and a small fraction of the duodenic ulcers are cused by this group of drugs. These drugs have an errosive effect on the mucosa that lines the stomach. Read more about stomach ulcers cased by errosive drugs here.
Peptic ulcers are caused by a damage in the stomac mucosa caused by infection with Hp or from errosive drugs. The damage in the protective lining of the stomach work as opening a door for the stomach acid and an enzyme (pepsin) to do harm. This causes the ulcer which develop trough the mucosa and into the muscle tissue of the stomach or the intestine. The diametre of the ulcer is usually more than 5 mm. Vessels that line the wound can be punctuated by the errosive effect mentioned, and a gastrointestinal bleeding can occur as a complication (perforated peptic ulcer).