Is this a figure of speech or is it literal? What exactly is being said in this verse?
Isaiah 62 is speaking about the redemption of the city of Jerusalem from its state of desolation and destruction. Isaiah foresees the time when her people will commit to her as a young man commits to his bride in love and devotion. God Himself will delight in Jerusalem as a loving husband cares for his wife. Just as in verse 4 Jerusalem goes from being called "Forsaken" and "Desolate" to being called "My delight is in her (Hephzibah)" and "married (Beulah)".
The marriage relationship has ever been used as a metaphor for the relationship between God and His people. Indeed, the Israelites worship of idols is termed "adultery":
Jeremiah 3:8 Then I saw that for all the causes for which backsliding Israel had committed adultery, I had put her away and given her a certificate of divorce; yet her treacherous sister Judah did not fear, but went and played the harlot also. 9 So it came to pass, through her casual harlotry, that she defiled the land and committed adultery with stones and trees.
In Christ, we are termed his bride:
Rev. 21:2 And I John saw the holy city, new Jerusalem, coming down from God out of heaven, prepared as a bride adorned for her husband.
Rev. 21:9 And there came unto me one of the seven angels which had the seven vials full of the seven last plagues, and talked with me, saying, Come hither, I will shew thee the bride, the Lamb's wife.
Ephesians 5:25-32 Husbands, love your wives, as Christ loved the church and gave himself up for her, 26 that he might sanctify her, having cleansed her by the washing of water with the word, 27 that he might present the church to himself in splendor, without spot or wrinkle or any such thing, that she might be holy and without blemish.28 Even so husbands should love their wives as their own bodies. He who loves his wife loves himself. 29 For no man ever hates his own flesh, but nourishes and cherishes it, as Christ does the church, 30 because we are members of his body. 31 "For this reason a man shall leave his father and mother and be joined to his wife, and the two shall become one flesh." 32 This mystery is a profound one, and I am saying that it refers to Christ and the church.
I hope that you have found this helpful.