"I" is a subjective pronoun used when referring to oneself as the subject of a sentence. For example:
I am going to the store.
Sarah and I are studying for the exam.
On the other hand, "me" is an objective pronoun used when someone is doing something to you or with you. For example:
He gave the book to me.
So, to summarize
"I" is the subject.
"Me" is the object.