The initials i.e. comes from the Latin phrase id est which literally means, "that is," but would best be presented as meaning, "in other words." This usually rephrases what was just written to help the reader better understand.
In this example I described a place and then better spelled it out for the reader in case they didn't understand what I was hinting at. Note that I didn't list places because I was only trying to describe one place.
However, e.g. comes from the Latin phrase, exempli gratia which literally means, "for the sake of example." This is then followed by a non-exhaustive list of examples.
In this example I am making a list of examples of breakfast foods. While I like the three breakfast foods listed, I didn't state how I also love oatmeal, sausage, french toast, and cereal for dinner as well. So don't list everything, you are only providing examples to help them better understand what you were trying to convey.
So all you have to do is brush up on your Latin and it all comes easy, right? Well... no. Here are three tricks I use to remember the difference.