Compare it to the following: a pixel-based image is an image that is chopped up into little pieces so that a puter can remember of each one the place and the colour.
This means that, if, for example, the image is 100pixels long and wide, there will be 100x100 pixels, or 10.000.
Each pixel takes a byte per colour, so, for the three monitor or light colours Red, Green and Blue, this image will take 30.000byte or appr. 30 kB.
our example is a very small image, and most are much larger. They are even so large that it would take hours to download them from the internet. that is why there are compression methods. One of these is jpg, and it is mainly used for photographs.
What jpg does, is group pixels together. All neighbouring pixels that resemble each other are remembered as a group. How far this resembling goes, is something you as creator can decide with the quality setting. But even at best quality, jpg compresses and data is lost: indeed, pixels that were not identical but close in resemblance get now a mean value, so, when enlarging, you start seeing squares and other artifacts.
Yet: when you open that jpg in for example Photoshop, this application sees a bitmap image of X pixels wide and Y pixels long, and that is why you get once again a full-size fat image, yet, with all the pixels that in the original were approximately the same, changed into a mean value.
When you now jpg once again, Photoshop will start from what it has, and reduce variety even more. That's why jpg is always lossy and even the more so when you manipulate it again and save as jpg.
These lost data are lost forever. There is no way that any computer app can restore what isn't there as it only sees ones and zeros.
Now for print: to get an acceptable print, you need enough small dots into each inch, and a minimum is some 150. To get really good printing, 200 up to 300 (and even more) is necessary. That is why you have to reduce the size of your 72 ppi image by setting the resolution in the Image>ImageSize menu to 150 or 300 without resampling (uncheck the box).