photoshopcafe[.]com/understanding-image-resolution-photoshop-beginners/
Decent video [YouTube] explaining resolution, ppi, dpi etc. It's a confusing topic, and hopefully this video will help.
Nowadays a 10 - 20 megapixel photo is common. What that means is that the number of horizontal pixels X the number of vertical pixels = 10 or 20 or whatever million pixels. On screen at full, 100% display size that's huge. But if you want to print it, setting the print resolution, dpi, to 300 or more is going to greatly reduce the size of the photo. Initially the photo's resolution is likely about 95 ppi, so if you set it in an editor to 300 dpi to print it, cool, but when you save that photo that 300 dpi may or may not be saved with the photo. So you can get unpredictable viewing or on-screen results if you don't pay attention to stuff like ppi.
OK, now ppi = Pixels per Inch. A pixel technically is the smallest dot your display can, well, display. A full HD display has 1920 X 1080 pixels. How big each pixel is physically depends on how big the display is -- when/if they have the same number of pixels, a 50" TV has much bigger pixels than a cell phone. With higher resolutions, e.g. 4K, the number of pixels increases, so the pixels necessarily get smaller. That's also why Windows has a setting to increase the size of whatever's displayed, like text and windows. As the pixels get tinier, so does the text and the program windows. If OTOH you set a 4K display to 1080p, it in effect merges groups of several pixels into larger pixels, because you're only supposed to have 1920 X 1080 pixels in total. That makes stuff bigger again.
Anyway, confusing stuff to get your head around -- hope the video helps.