The words [夫]{おっと}and [主人]{しゅ・じん} both mean "husband".
What's the difference between them?
The meaning is basically the same as you said: husband.
According to this website the main difference is in the situation in which you use these words.
Simply put:
「夫」: You can use it in most situations.
「主人」: Mostly used when talking with superiors or people you're not very familiar with.
BONUS:
「旦那{だんな}」: Is used when you are speaking with people you are familiar with.
To be even more precise it seems that 「夫」 is used as the opposite word of 「妻{つま}」 (wife). On the other hand 主人 bears a bit more the meaning of "house chief" or "master" (of the house).
I can expand more maybe later (I gotta go back to work now :p ).
「主人」 is "master", as in "master of the house". It can be used in some other situations where we might use master, as well. (But not all.)
「旦那」 means somewhat the same, but should be considered strictly colloquial. The use varies a bit by dialect, however. It is usually used relative to one's own 主人、 except you use 「旦那様」 for 「ご主人」 in certain dialects。
A woman can be called either, particularly if she is a widow, or is otherwise the master of a house. (But some widows would not appreciate it, so don't use either relative to a woman unless you are given explicit permission by the woman in question, herself. Really awkward, such situations.)