A layer exists in Adobe Photoshop to separate items from one another. You can click on any layer twice and re-name them to identify them correctly and for later use.
Per example, you have a single layered image that you put into Adobe Photoshop. It only has one layer because it hasn't been modified by you and most likely was converted into a single layered image through image exportation. That's how it works. When you save a PSD and re-open it, it still has every distinct layer saved in it. A JPG does not, because it is an image file can be easily opened with an image viewing program and was turned into a single layered image through Photoshop.
You can create layer masks when modifying an image with Photoshop, per example if you want to isolate a person from a landscape and put the person on a different background. There are many ways to do this but the layer mask way is the easiest way.
Layer masks help you identify objects/items that will later be converted into an image file that only has one compressed layer.
Without layers, it would be impossible to work with Adobe Photoshop. It's the base of Photoshop.