Resolution refers to the number of pixels - dots - in the image. Note that this is independant of the viewed size of the image. The sensor in the camera will have a maximum number of pixels it can handle.
If you reduce the number os pixels in the picture you take, there are literally less dots. This makes a difference as you increase the viewing size, as the number of pixels stay the same, they will get larger. Remeber that the average computer screen, at say 800x600 pixels = 480,000 pxels in total - at 1280x1024 resolution it has 1.3m pixels.
Compression is an algorithm applied to the storage of the data in the picture, to reduce the size of the file. The more compression, the smaller the file. Compression actually lose information from the picture, so the more compression, the more information is lost. But NOTE, it does not change the nuber of pixels in the image.