So here's Naomi's plan: Ruth is to go down to the threshing floor that night and meet up with Boaz. She will appeal to his better nature (and his probable sexual desire for a beautiful young woman) in order to ask him to perform his sacred duty as a "kinsman".
The nature of the duty of a "kinsman" is outlined in various spots in the Mosaic Law. There are different words for a relative, but the Hebrew word goel means something deeper. One aspect that is not applied in this story, but is highly important, is that of an avenger of a slain relative. When someone was killed, it fell to the goel to track down the killer and bring him to justice. In this case, the dead relative died of natural causes, so this service is not needed, but the goel served two other purposes, both of which are needed under the Law.
Leviticus 25 talks about how real estate works among the Israelites, and in particular, verses 23-28 outline the fact that when land is sold, it must always be made available to the original family that sold it to buy it back. This was one of the duties of a goel: to buy back land for his family if he was able. But what good would it do Ruth and Naomi to have land in a culture where women didn't generally do business? This is where the third and most foreign-sounding custom of the goel comes into play: the so-called "Levirate marriage". In Deuteronomy 25:5-10, it is explained how a family is to deal with a widow who has no children. In Israelite culture, it was considered very important to have a son to carry on the family line, and if a man died with no son, his wife was to marry the deceased husband's nearest relative and bear a son that would be the heir. There are some especially odd elements to this law that we will revisit in the next chapter.
So, back to our story; Ruth and Naomi are thinking that Boaz can be not just a generous giver of charity, but potentially he could be the solution to all their problems, buying back Elimelech's land and giving Ruth a son. Boaz wakes up in the middle of the night and is startled to find Ruth at his feet. Ruth implies (although once again, I'd like to point out nothing explicitly happens) that Boaz should do his duty and "spread therefore thy skirt over thine handmaid; for thou art a near kinsman." This is a bit of a double-entendre, implying both "give me protection" and "let's get it on, Boaz."
Boaz is flattered, but initially says no, because it turns out he's not Elimelech's nearest living male relative, and he has to give the other guy first chance to carry out the duty of goel. He lets her sleep there until morning, and sends her away with more food, assuring her that he'll resolve the matter.
Where does all of this business of a goel's duties come into our allegory? It's actually central. The nation of Israel awaits their Messiah, knowing that he will come and redeem them, returning them to their land and restoring their inheritance. It's interesting that the rules about the redemption of the land in Leviticus 25 should be side-by-side with rules about the sabbatical year. The Israelites were told that they should only plant in their fields for six years, and let them lie untended and unharvested in the seventh. God actually told them that if they failed to do this, He would take those years back from them (Leviticus 26:33-35). God gave Israel the land of Canaan, but they lost it and went into exile; twice, actually.
Both the nation of Israel and some members of the gentile nations recognize their need for a redeemer, but can we be sure that this redeemer is Christ? What if there is another way? Does Christ have to yield to "a kinsman nearer"? Can a goel redeem even a foreign woman?