The difference between aimer in the passé composé and imperfait can be quite tricky to grasp.
Let’s take a simple example:
Nous avons aimé le film – We liked the film.
Because the passé composé refers to things that have completed in the past, it can seem like that we are saying that we liked the film but we don’t anymore, but in fact we are saying we liked the film and still do. Here the passé composé is referring to the action of liking the film which is now completed (i.e. you are not watching the film right now), but not the completion of the state of liking.
The imperfait of aimer refers to something that you did like or were liking until something else happened.
Nous aimions le film jusqu’à la scène avec le fantôme – We liked the film until the scene with the ghost. / We were enjoying the film until the scene with the ghost
And it can also refer to something you continuously liked in the past, but you are no longer involved in the experience:
J’aimais travailler comme camionneur – I liked (it when I was) working as a truck driver.
Here you are talking about a continuous liking for being a truck driver, the entire experience, almost as if you are talking from the perspective of when you were actually a truck driver, you are placing yourself in the scene in the past.
But, if we use the passé composé:
J’ai aimé travailler comme camionneur – I liked working as a truck driver.
We are talking about a liking for being a truck driver generally, maybe not all of it, but it was something you liked doing; the perspective is from outside the scene; you are placing yourself in the present.
As with many state verbs in the passé composé and imperfait, some of the differences are nuanced and are quite difficult to understand. Even in English it’s difficult to explain the difference between “I liked it when I was doing” and “I liked doing”, there isn’t a huge difference in meaning, it’s just “I liked it when I was doing” feels a bit more dynamic – you are liking it at the time, from inside the experience (imperfait) – but “I liked doing” feels a bit more disconnected, as if you are talking from outside the experience (passé composé). These are nuances we pick up automatically in our own language without ever really thinking about them, and it’s the same for the French, which is why the difference between passé composé and imperfait is one of the most difficult aspects of French to fully understand.