Marriage is a gameplay element in The Elder Scrolls V: Skyrim. After obtaining the Amulet of Mara, the Dragonborn has the option to engage in marriage with an eligible NPC regardless of either party's gender in the potential marriage.
It's a common Marriage bug in skyrim. You have to talk to Lydia before she leaves the church so you can decide where you two will live. If they walk out before you decide where to live they'll disappear.