Just a bit puzzled about lossy formats.
I know that JPEGs are lossy, but if you have an original image taken as a high quality JPEG, and then adjust it using layers, it becomes a PSD file. If you save the file as a PSD and don't flatten the layers and convert to a JPEG, do you still lose quality when you re-open the PSD file?
Let's clear one thing up right away; when you take a picture as a JPEG there is already data lost. Although it may not be visible to our eyes, the camera's JPEG processing will drop some information to compress the file size. Only a picture saved (in camera) as RAW or, with some cameras, TIFF format will retain all the information captured. The RAW image not only retains the value of each individual pixel (dot) but it also records additional colour data which improves colour integrity.
Whenever you load a picture into any photo editor, the image's data becomes internal to the program. There are only two ways of getting data loss - editing and saving. Editing is obvious data loss. If, for instance, you convert the image to monochrome, there is no way that you can edit the original colour back in. All you could do is undo the edit. But the process of saving the image at the end of the session has the potential for data loss.
Many editors have the facility to save the file in the editor's native format. For Photoshop this is a PSD file. The PSD file retains all the image and editor data just as though it was a memory dump of the session. This means it keeps all the layers as well. When you load up the PSD file it brings back every bit of information and you can continue editing as though you didn't have a break.
But a PSD file is not very portable. It can only be guaranteed to be successfully reloaded on the same computer as it was saved from. Many PSD files can be opened on other versions of Photoshop but there are sometimes compatibility issues. Eventually, to make the image available to another computer, you will need to save the file to a format that can be read by it. In most cases this will mean JPEG format, but if your recipient's software is able to read/process/display TIFF files then this is a format with no loss.
If you save an image in JPEG format you have control over the amount of compression used (JPEG quality.) If you set it to the maximum value, then there is little chance that the loss of data integrity will be evident. But if you continually repeat the 'open-edit-save' process (in JPEG format each time) then each time there will be some degrading of the image and sometimes unwanted artifacts will creep in.
Finally, in summarising the answer to the original question, you don't lose quality when you re-open the PSD file.