Each is used when we think of things separately. It is most often used for small numbers of two or more.
Every refers to larger groups. It thinks of every noun in the group as a separate thing.
- There were four socks on the bed. Each sock was a different colour.
- I have read every book in the library.