High impact journals - Do they always guarantee high quality papers? In academia is common to hear the phrase 'publish or perish' and also that your articles have to be of high quality. So e.g. 4 articles in low impact journals worth as 1 article in a well ranked journal.

But then my questions:


Is it always guaranteed the high quality of your papers if you publish in a high impact journal?
Or there can be the possibility that your (theoretical) high quality papers, published in good journals, are actually low quality?
Is it all about number of citations?


I am new to Academia so please forgive my naivety.
Thanks
No they do not.

That is the short answer. But that is mostly due to the fact that nothing is guaranteed in this world. High impact factor journals are most likely to have a high percentage of high quality articles since rejection rates are high and the editors have the possibility to choose from a large pool of submissions what they deem worthy. In consequence, the editor's opinion about the quality of an article is of significance. 

After the editor's decision, reviewers are still able to reject articles. In some journals rejection rates are still as high as 40% after the first review. 

You should keep in mind that a high quality, Nobel prize level publication can be published in any journal in its field, but a low quality article might only be published in a low impact journal or be rejected altogether.

TL;DR: On average, high impact journals should have a high density of good publications.

A last note on your last bullet point: A large number of citations certainly shows that an article is significant in its field. A low number of citations could either mean that the article is insignificant or that nobody noticed its significance yet. In the end, that is why you publish in high impact factor journals: You want to get noticed.