When and why should (i.e.) and (e.g.) be used?

Thanks.

i.e. means: "that is.." or "in other words", and is followed by an alternate statement to clarify a previous statement

e.g means "for example"