Matrix and Animatrix
First of all the matrix is the main story, where all the other movies were based on. In a brief summary: The matrix is the system of control used by the machines, that somewhere in time took over the control of the earth. Humans and machines have lived in a war ever since, in this movie its not known who exactly started the war. The problem is that in some point the humans turned the sky black to cut of the power of the machines, the machines unable to get energy from the source turned their attention to a new source of energy...HUMANS. They use humans as batteries. In this movie the main character is Thomas Anderson aka-Neo. The movie is about this main character first discovers how he indeed is part of a system of control, and that the real world is nothing like he thinks it is, and it is also about the journey of discovering that he is the ONE that is going to help end the war once and for all the war between men and the machines.
On the other hand we have the animatrix, this is a movie created after The Matrix and released just before Matrix reloaded, this film show stories of people in the matrix. There are three main shorts in this movie, Second Renaissance part 1 & 2 and The Final Flight of the Osiris. the first two tell the story of how the war between humans and machines started, it is purely historical. The second is the introduction to the second movie Matrix Reloaded, tells the story of how the humans found out about the machines that were about to attack their main city. The other shorts either go deep into personal histories of character like Trinity or introduces new characters in the mainstream story, like the kid, that appears in Kids Story and the same character appears in the second film making reference to the animatrix short.
The main difference between The matrix and Animatrix is that the first one is a full-fledged movie, that sets the whole story. The second one is more like an complementary film used to clear out some doubts and to be the bridge between the first and second movie. Another important difference is that Matrix has the Wachowski brothers as directors and in the Animatrix each short has a different director each one printing his vision of the Matrix based on the concepts created by the Wachowski brothers.