The story of Odysseus and Penelope spans both of Homer's great epic poems The Iliad and The Odyssey.
Just before the Greek army sailed for Troy, Odysseus and Penelope bore a son, Telemachus. Rather than abandon his newborn son, Odysseus pretended to be crazy, but it was to no avail. Menelaus and Agamemnon knew of his trickery.
Odysseus would not see his family for 20 years. While their father was fighting the Trojan War (10 years) and was lost at sea (10 years), they tried to defend Ithaca against a bevy of suitors who vied for Odysseus' throne.
Penelope was a trickster like her husband. To keep the suitors at bay, she wove a shroud in his honor. She told the suitors she would remarry only after it was finished, but she secretly unraveled it every night.
Meanwhile, Odysseus returned and made himself known to Telemachus. Together they slew the suitors with more trickery: Odysseus disguised himself as an old man, strung his old bow, and shot it through the loopholes of twelve battle axes.
Later, Odysseus tested his wife's fidelity. And she tests him by moving his bed to see if he would notice. After he became furious, Penelope knew the beggar was her brash husband. She too, of course, was faithful to her husband, and after twenty years of suffering, the family was whole again.