Compression reduces the data needed to represent the image, audio, or video. During lossy compression, artifacts (errors) are created as a side effect. These artifacts may or may not have an impact on the quality of the resultant file. Whether or not this occurs is based on the complexity of the algorithm used during compression.
Processing power and compression algorithms are interrelated. A more powerful processor can execute a more complex algorithm more efficiently (i.e.: in less time). A newer, more complex compression algorithm can be introduced because newer, more powerful processors can handle it.