To be in the same unpleasant situation or to have the same problem as other people.
Origin
The idiom was first used by the ancient Greeks when speaking about the risks that all passengers in a small boat at sea had to face together. Now it is used to describe any unpleasant situation, not only if you are in a boat!
Examples
John: “Can you pay for lunch today?”
Simon: “I can't, sorry. Pay day is tomorrow so I'm in the same boat as you!”
“Tom was fired from his job yesterday. Now he’s in the same boat as Mary – she hasn't had a job since July.”
“I know that Paul is difficult to work with but we're all in the same boat. We all have to work with him so please stop complaining!”