Doubles and Troubles
Take out doubles are usualy at a low level bid or after a pre-empt. The person who doubles means it it be taken out to partners longest suit but the partner can leave it in and convert it to a penalty double.
When is a double for penalties?
a) 1H This is a take out double asking partner to bid his best suit ideally a major. He will be short in Clubs or the double and have at least 3 cards in every other suit
b) 1C
X   / This is also  a take out double asking partner to bid 1 of the two unbid suits (if possible). He will be short in both of opposition suits
c) 1C
2H   1H       X This is a penalty double because you already have a fit and know the best place to be. Partner has the option to  take it out to 3 H
d) 3S
  X Again a take out double. Hit me with your best suit partner
e) 4H
  X Also a take out double
f) 4S
  X This is systemic. Most people play the double over 4S as penalty and 4NT as the take-out
g) 1NT
  X Unless you have another system the double here is for penalties and shows 16+ pts. Partner is expected to leave it in if he knows that his side has the balance of power i.e.>20pts