Given a number of things x we can sort all of them into two classes: Animals and Non-Animals.
(1) 'Not all x are animals' says that the class of non-animals are non-empty. There exists at least one x not being an animal and hence a non-animal.
(2) 'there exists an x that are animal' says that the class of animals are non-empty which is the same as not all x are non-animals.
The point of the above was to make the difference between the two statements clear:
For sentence (1) the implied existence concerns non-animals as illustrated in figure 1 where the x's are meant as non-animals perhaps stones:

For sentence (2) the implied existence concerns animals as illustrated in figure 2 where the x's now represent the animals:
If we put one drawing on top of the other we can see that the two sentences are non-contradictory, they can both be true at the same same time, this merely requires a world where some x's are animals and some x's are non-animals as illustrated in figure 3:

And we also see that what the sentences have in common is that they imply existence hence both would be rendered false in case nothing exists, as in figure 4:
Here there are no animals hence all are non-animals but trivially so because there is not anything at all. Likewise there are no non-animals in which case all x's are animals but again this is trivially true because nothing is.