This is due to the failure of some the nerves that control the small muscles of the foot. The muscles that keep the toes stable and properly aligned stop working when the nerves that control them stop working. Over time, a variety of structural changes occur. This may include bunions, hammertoes, and prominent metatarsals. Any structural deformity, such as those just mentioned, will cause abnormal pressure to the soft tissues over the prominence.
Skin is an amazing structure.
It performs many wondrous functions including providing a barrier to the loss of moisture, protecting against damage from outside stress, and keeping out dangerous microbes. This latter function is certainly altered when an ulcer is present. Any passing microbe has easy access to that fertile ground that is the soft tissue beneath the skin. One of the systems that is affected in the diabetic is their immune function. This means they do not fight infection well, and so an ulcer poses a very real danger.