Two men who worked for Pharaoh, his baker and his cupbearer, were thrown into the same prison Joseph was in because they had somehow angered Pharaoh.
While they were there, they had strange dreams, dreams they knew meant something. But, they were bummed out because they had no idea what they actually meant.
Joseph asked them, "What's wrong, guys?" They told him about their dreams, about how they didn't know what they meant.
"God can help me understand what they mean. Why don't you tell me them?" Joseph said. And so the cupbearer and baker did so.
When they were finished, God helped Joseph understand exactly what the dreams meant.