When his wife didn't get what she wanted from Joseph she accused him of rape and he got put in jail for a long time.
When Joseph gets released from jail he meets the pharaohs butler and baker and he interprets their dreams. The pharaoh then wants Joseph to help him with his dream. He tells the pharaoh that his dream is symbolic of how there will be 7 years of good crops followed by 7 years of bad crops.
then when the famine hit, Josephs brothers came to him not knowing he was their brother.
Joseph then feasts with them and gives them what they asked for, he knew how he could get revenge on them. So he put his golden goblet in Benjamin's bag and set them off back home.
When Joseph's guards caught Benjamin they returned Josephs brithers back to him and he told them that he was their brother. So he ordered them to bring his father to him.
They went home, got their father and returned to Joseph. He was reunited with his father and his father gave him back his special coat to remind him of his long journey.