Interesting answer sets. But some are still a bit misleading. I will try to summarize.
1) Opening a file does not affect it in any way. Also closing it. Not in a viewing or editing program.
You may see the file differently in different programs, but it may be because that program interprets certain information such as color mode or color profile. But this process only reads it.
There is a chance of small changes
2) Perform lossless operations, such as rotating an image. Normally, programs simply order data from a jpg file, without parsing or recompressing. But I would not get my hands on the fire for all the programs that suppose to do so.
Small harmless changes
3) Open and save with the same compression on the same program.
A first recompression is performed the first time you save a jpg file. If you save the file a second time with the same settings, the original data loss is already done, but small changes can be applied again. Not to the same extent as the first, but it can be done multiple times. But it depends on the program.
4) The most obvious is saving with a different compression setting.
Not only on the "scale" of everything the program has, but also on the algorithm used. It's a bit too technical but there are at least two main 4: 4: 4 and 4: 2: 2 compression algorithms.
You can use your program's "slider" to get higher "quality", but if your program uses 4: 2: 2 and the original was 4: 4: 4, you will have significant data loss .
Here is a little paper I made a few years ago so you can see what this data loss means, it's in Spanish but you can use google translate: http://otake.com.mx/ apuntes / PruebasDeCompresion2 / 1-CompresionJpgProceso.htm
A total mess
5) If you open an image and re-record it on a program with limited capacity. For example, a viwer can only save RGB files and does not work properly with CMYK files, or maybe it does not understand the built-in color profile. You could totally ruin your image when saving.
6) Using a lot of compression. You save it for your website and compress it. Do not delete your originals!
Only on the edited part of the image
seven) Recompression is normally performed on the entire image, but as I mentioned in point 3, it is not much if the image has not changed. When you modify an image, this analysis must be carried out again on this modified part.
Remember that a change can be classified into three groups.
a) Corrections of colors, contrast, etc.
b) Modify part of an image (red eyes, remove a person, clean unwanted spots)
c) A completely new collage.
So in some cases the picture is totally different, at least from the point of view of analisis and recompression.
In this article: https://photo.stackexchange.com/a/67434/37321, the user mentioned a program that makes a very clever analysis of the existing compression and does not recompress it if it is not. is not necessary.