Both I and me are personal pronouns.
I is a subject prounoun and it's used for the subject of the sentence. He, she, we, it, they and you are also subject pronouns.
"Hugo and I work in the same office" - 'Hugo and I' are the subject.
Me is an object pronoun and it's used for the object of the sentence. Him, her, us, it, them and you are also object pronouns (you can be both a subject and object pronoun).
"Lisa bought Amanda and me a drink" - 'Lisa' is the subject, 'Amanda and me' are the object.