To erode is to gradually wear away, or to be gradually worn away. (verb)
When water continually washes over soil and begins to wash away that soil, this is an example of a situation where the water erodes the soil.
When the side beds of a stream are washed away because of the ongoing movement of the water, this is an example of a situation where the side beds can be said to erode.
When someone's confidence is gradually worn away at and diminished, this is an example of a situation where his confidence is eroded.