Both of these abbreviations come from Latin phrases:
Here are some examples of how to use e.g.:
(biology, chemistry, and physics are examples of sciences)
(the error in the statistics is an example of the mistakes in the report)
We typically only use e.g. in writing. When speaking, we would simply say “for example,” “such as,” or “like” instead.
Here are some similar examples of how to use i.e.:
(the second statement provides more information that logically follows from the first statement)
(the first and second statements are two different ways to express the activities of the after-school program)
(again, the first and second statements are two ways to talk about the problems with the report)
We typically only use i.e. in writing. When speaking, we would use “that is” or “in other words” instead.