This line comes from Act I, Scene I, and it is chanted by the three witches as they await the end of the battle. At first glance, this line is a paradox since it is not possible for something to be "fair" (nice) and "foul" (horrible) at the same time. However, this paradox is central to understanding what the witches truly mean: by using this line, they are warning the reader that everything is not quite as it seems in this play. In other words, appearances can be deceptive, and the reader must not take the play's events and characters at face value.
As the play progresses, the relevance of this line becomes more apparent and is proven true through the character of Macbeth. On the surface, Macbeth is the ideal thane: he is loyal to the king and fights bravely in battle. But Macbeth is quickly and easily seduced by the prophecy that he will become king, and he soon begins planning Duncan's murder. Therefore, Macbeth seems to be "fair," but he is really quite the opposite.