First, we should understand why these statements look the same.
They look the same because each one has a hidden clause that your brain fills in from informal english.
In the first case, if I say "Not all of these are animals", your brain adds a "Some, but" to the front. And in the second case, when you say "Some of these are animals" your brain adds a ", but not all" right after that some, so you end up with "Some, but not all of these are animals" in both statements.
We do this because in colloquial English, that's what those statements mean. So this is a problem of informal versus formal language. Informally speaking, if I say "not all" and "some", I'm saying the same thing. But in formal language, I'm saying something different. "not all" means "it isn't true that all" and "some" means "it is true that at least one".
So looking at the formal definitions, how are they different?
Say I give you two decks of cards. You have been told that each card has a picture on it, either an ear of corn or a mouse. For the first deck, I tell you "not all of these are mice" and for the other I say "some of these are mice". I want you to verify or refute those statements.
With the first deck, you get to stop at the very first ear of corn. One of these cards is an ear of corn, so not all of them are mice! With the second deck, you get to stop at the first mouse. One of these is a mouse, and one is enough for "some"!
Importantly, we don't have to look at any more cards in either case. The statements are true for each deck, even if there isn't a single mouse in deck 1 or a single ear of corn in deck 2, or if the cards are mixed, or if the first card is only example. We just don't care beyond that first ear of corn or mouse.
To refute the statements, I would have to look at every card. For the first deck I need to verify that there is no corn in the deck, for the second deck, I need to verify that there are no mice.
If I have a deck of all corn, it verifies the first statement and rejects the second. Different result, different statement.
There's a lesson here for all of us, though. This is an example of a really easy misunderstanding waiting to happen, because the language is ambiguous. If it's important that you mean "at least one", don't use "some". If it's important that you mean "but not all" add that as well!