Is it legal to be married to two people?

Not in most countries. There are a few countries were having more than one wife is allowed, several in Africa. In the US it is bigamy and is against the law.