Both the imperfect and the perfect tense are used to talk about something that happened in the past. However, the imperfect tense tends to refer to things that happened over a period of time in the past. For example, I was eating my dinner = 'je mangeait mon dîner'. However, the perfect tense is used to talk about things which happened as a one off or happened immediately. For example, she lost her bag 'elle a perdu son sac'.
Sometimes both tenses can appear in one sentence. For example, I was washing the dishes when she entered the room = 'elle faisait la vaiselle quand elle est entrée'. Both of these tenses are very dependant on the context of the action.