The two main settings of the eraser tool found in the toolbar are the basic eraser tool and the background eraser tool shown below.
The basic eraser tool will removed pixels from your picture down to whatever background colour you have selected. In the example below royal blue was selected as the background colour and that is what Photoshop reveals.
The background eraser tool will remove pixels from your pictures and leave you with a transparency. I.e. This is probably the more useful of the options.
Like the other tools of Photoshop there are many options for you to experiment with such as brush size, shape and pressure, but to start with stay with the two main ones.