You can erase areas of a pixel or vector layer using a combination of the Erase Brush Tool, the Brushes panel and the tool's context toolbar. Typically you'd erase previously unwanted pixel brush strokes on a pixel layer.
Erasing on a pixel layer
You can use the Erase Brush to erase unwanted pixels directly on the layer using the same principles as the Paint Brush Tool.
Background Erase takes a sample of the color under the cursor when you begin to erase, and will remove all closely matching colors directly under the brush stroke.
To erase on a pixel layer:
From the Layers panel, select a pixel layer.
Select the Erase Brush tool.
Adjust the context toolbar and vertical sliders settings, as required.
Drag on the page in the direction that you want the erase brush stroke to follow.
To use Background Erase:
As for Erase Brush but instead choose the Background Erase. Tap on the page over the color you want to erase in the image and drag within the image to erase that targeted color directly under the brush cursor.
To use the Flood Erase Tool:
From the Layers panel, select a pixel layer.
Select the Flood Fill tool and change the Mode to Erase.
Adjust the Tolerance setting via the vertical slider to control the extent of flood erasing across pixels. Experimenting will produce labor saving results.
Tap on the image to select the target pixel.
Erasing on a vector layer
As pixels don't exist on a vector layer, a pixel mask is created and applied over the vector layer instead; both vector and pixel layers can be edited using the respective vector tools and layer masking. By painting with pixel brushes directly on the mask, you can decide what can be shown or hidden on the underlying vector layer.
To erase on a vector layer:
From the Layers panel, select the vector layer.
Select the Erase Brush Tool.
Paint over the vector layer content to erase.
As you erase, in the Layers panel, you'll notice the newly created mask is selected. While this remains selected you can continue erasing.