It depends on what you are describing. If talking about an activity which you undertook regularly and for an unspecified amount of time, you would use the imperfect tense. Eg. "Cuando era pequeña, tocaba el piano." (When I was younger, I used to play the piano.)
However, if describing a specific event where one thing was happening and then another, you would use the imperfect and then the preterite. For example, "hablaba con mi madre cuando de repente empezó a sonar mi móvil." (I was talking to my mum when suddenly my phone began to ring.)