The Impact Factor is a measure of the frequency with which the "average article" in a journal has been cited in a given period of time. It is one way scholars measure the relative importance of a journal within its field.
In other words Impact Factor is a proxy for quality of a journal, but it does not indicate quality at the level of an individual article.