If the two actions are at the same time (or almost simultaneous) and short, use the past:
He leapt up when the pohine rang.
If they are are longer actions at the same time, use the past progressive:
While I was working hard, you were sitting around doing nothing.
If one came before the other, use the past perfect for the first (though often we just use the past)
When I got there, everyone had left.
Also, remember that these are generalisations.