Consider the usual language and axioms of ZF. Now add constants $x_1, x_2, \dots$ to the language together with the axioms $x_2\in x_1, x_3\in x_2, \dots$ to form a new theory. Then by the compactness theorem, since every finite subset of the axioms has a model, the new theory has a model. But doesn't the set {$x_1, x_2, \dots$} have no $\in$-minimal element, contradicting the axiom of foundation?
I'm thinking that maybe {$x_1, x_2, \dots$} is not necessarily a set in the model, but isn't it by replacement? Maybe not, since we don't necessarily have a copy of $\mathbb{N}$ in our model... Could someone clarify this please?