My question is pretty much the title, but to be more clear I was wondering what happened to the kings of conquered countries. As in, if a king was defeated by an attacking force were they usually captured, killed, or something else?
Your question is a little bit broad and I'm not quite sure if you are asking. Do you mean what happens if a king is defeated in battle and captured by his enemies, or what happens to the king when a country is defeated, regardless if the king was in battle?
Generally, nobles would be ransomed if captured in battle in medieval Europe (I cannot speak for the wider world, e.g. feudal Japan). The ransom itself would be dependent on the rank of the nobleman, as the higher ranking nobles could and would pay more for their safe release. For example, King John II of France was captured by the Black Prince during the Hundred Years' War between England and France. His ransom was set at 600,000 francs, and he was treated very well, according to his station*.
This may not be exactly the answer you are looking for, as France wasn't conquered in the Hundred Years' War.
Source: