By saying 'married' Im assuming you mean 'have a child'?
You must first become friends with a Tamagotchi of the opposite ***.
Once you are friends, give eachother gifts and connect as much as possible, until you each have 4 love hearts. This means you love eachother.
Then, you must keep connecting and connecting! Eventually they will mate, fireworks will appear and on each Tamagotchi they will have a baby next to the adult characters.
If you dont have another Tamagotchi to do this with, you must have babies via the Matchmaker. Which appears at certain times, and asks if you would like to get married.