Ecthyma is a skin infection caused by bacteria, usually streptococcus or staphylococcus, that creates painful sores and ulcers typically on the lower legs and feet. It is a more severe form of impetigo that penetrates deeper into the skin layers.