Hi Katie,
yes, the Imparfait can express habits in the past or describe the setting of an event which happened in the past.
Le dimanche je visitais le musée.
-- Sundays I used to visit the museum.
Je visitais le musée quand j'ai rencontré Marie.
-- I was visiting the museum when I met Marie.
-- Chris (not a native speaker).