We can use six different tenses to talk about the past:
the simple past (I worked)
the past progressive (I was working)
the present perfect simple (I have worked)
the present perfect progressive (I have been working)
the past perfect simple (I had worked)
the past perfect progressive (I had been working)
The two past tenses (simple past and past progressive) are used to talk about past actions and events.
I worked all day yesterday.
The boss came in while I was working.
The two present perfect tenses are used to show that a past action or event has some connection with the present.
I've worked with children before, so I know what to expect in my new job.
I've been working all day — I've only just finished.
The past perfect tenses are used for a 'before past' — for things that had already happened before the past time that we are talking about.
I looked carefully, and realized that I had seen her somewhere before. I was tired, because I had been working all day.