The Eraser tool changes pixels to either the background color or to transparent. If you’re working in the background or in a layer with transparency locked, the pixels change to the background color; otherwise, the pixels are erased to transparency.
You can also use the eraser to return the affected area to a state selected in the History palette.