Hi Miro -
I'm sorry it took so long to get back to you, but let me see if I can answer your questions. Unfortunately, to do so, we first have to spend quite a bit of time getting some important preliminary concepts and definitions out of the way ...
#1) I have to point out that one of the most important and frequent words that you use in your question is, "quality". Unfortunately, this word has many different meanings depending on the context and the speaker. So, instead of using that term, for the purpose of this discussion, lets try to replace it (as appropriate) in your question with one of two more quantitive terms that are usually almost synonymous with "quality: "PPI" and "information content", at least in discussions on this topic.
This definitional issue is closely related to the meaning of the word, "resolution", as it pertains to Photoshop, and images, in general. There is much more info on this in this sticky thread:
https://www.photoshopgurus.com/forum/photography/45029-meaning-term-resolution-photoshop.html
#2) In your question, you don't distinguish between the two different ways one can change the PPI setting of an image: "with resampling" and "without resampling". This is probably one of the main reasons you are having a hard time wrapping your head around these concepts.
Much has been written on the difference between these two options, but in short, it comes down to the fact that if you change the PPI setting of an image with the "resampling" box NOT checked (i.e., resampling = OFF), then no changes are made to your image data. Specifically, the size of the image (number of pixels in each direction - the "pixel dimensions") stay the same. None of the old data is deleted, and no new data is synthesized (i.e., estimated from existing data points). No information is lost, and no information is ever created when the "resampling" option is OFF.
The only thing that changes in this case is one number, the value of Photoshop's PPI variable (which Adobe calls "resolution" within Photoshop). This PPI number is embedded in the file and may or may not be used by printers to set the spacing between pixels, and hence, the overall physical size of the image. In fact, most commercial printing services, do-it-yourself kiosks, and even the software from the mfgr of the printer to drive most locally attached printers completely ignore the PS's PPI number and simply ask the user for the physical dimensions (in inches or cm) that you want the print to be and calculate the needed PPI number from that.
This is the exact opposite of what happens when the re-sampling option is turned on (i.e., checked). In this case, the pixel dimensions will almost always change. For example, if you increase the PPI setting WITH RESAMPLING ON, new data points (in-between the old ones) will be generated, etc. Because the total number of data points in the image has increased, in principle, the information content of the image might be expected to increase. However, because the added data points were derived from the old data points, and are not independent, new measurements of the RGB values at the new locations, the actual information content doesn't actually increase, and actually usually somewhat decreases.
So, now that the preliminaries are out of the way, let's address your questions:
So, say I have an image that is 3500 pixels wide, if I choose in Photoshop that it has 100 pixels per inch instead of 300 pixels per inch, that means that the quality is lower because there are less pixel per one inch, but there are more inches of the width of the resized picture which automatically makes it way bigger, right? ...
I would answer your question in terms of the concepts we just discussed. If resampling was OFF when you changed the PPI value, AND IF the printer obeys the PPI number from PS, the pixels on the print will be further apart and the physical dimensions of the print will increase (compared to what it would be at a setting of 300 PPI). So, the "quality" in terms of PPI decreases, but "quality" in terms of information content (eg, numbers of rocks you can count in a hypothetical landscape) won't change.
...The width increases by about 300% because of the fact that I use only a third of the original pixels per inch, but the quality lowers because instead of having 300 pixels over the space of one inch, I only have a third of that, which is 100 pixels. ...
As I said above, if, by "quality", you mean PPI, then your statement is correct. However if, by "quality" you mean true information content (eg, how may separate rocks can you count in your hypothetical landscape), that won't change at all. The information in the file will simply be spread out over a larger area on the print.
...But then, I wonder, what would happen if the original picture was like 1920x1080, with a resolution of 100 pixels per inch, and then I would increase the resolution to 300 pixels per inch, making the whole size of the image to 5760x3240, ...
In this scenario, you have assumed that the pixel dimensions increase. This means that you must be assuming that resampling is ON. Even with this, the quality in terms of number of resolvable rocks in your landscape (LOL) will hardly change at all - exactly the same as if resampling had been off. However, since, in this scenario, you implicitly assumed that resampling was ON, the only difference might be the area over which the information is spread, and that will depend on whether or not you adjust the physical dimensions in Photoshop, and if the printer actually obeys that suggestion. (Note: in actuality, whenever resampling is on, you always lose a bit of information, but it's often relatively small for this discussion)
...would all I do be increase the size of the file without any quality improvement, or would it actually also higher the quality? I very much doubt, logically, the second choice, because Photoshop would have to make up those pixels itself and it can't. ...
If you increase the PPI from 100 to 300 with resampling OFF, the quality in terms of how many pixels you have packed into each inch, of course, goes up. However, in terms of how many rocks you can count (i.e., the information content) doesn't change in the least. If the resampling had been ON, the number of PPI would dutifully increase, but the information content (i.e., the number of resolvable rocks) would hardly change. If anything it might slightly decrease.
...And why is the 300 pixels per inch number the best one for printing? Why not go higher? Wouldn't that mean an even better quality? ...
This number comes from the resolution of a healthy human eye viewing a print at about arm's length. If your pixels are spaced this close (or closer), even a person with 20/20 vision won't be able to resolve them. Making the PPI value even larger than 300 PPI doesn't help (i.e., appear to increase the "quality", sharpness, decrease the visibility of individual pixels, or anything else) because even the best human eye can't resolve pixels closer together than roughly 1/300th of an inch.
HTH,
Tom
PS - I had to run again before I fully proof read / checked what I wrote. I apologize if you run into any errors.