Why are acids and bases corrosive?
Our skin is made up of many compounds, most of which are organic, meaning that they contain a lot of carbon-hydrogen or carbon with other elements bonded together.
Acids and bases are extremely reactive with those compounds, meaning that if they touch them, they will form salts and destroy the original compound, thus damaging our skin.
Another important factor is that strong acids and bases dissociate extremely well when in contact with water. So, when our skin is wet and has some water on it, the acid can dissociate extremely strongly, and thus it's very corrosive to our skin.