If something is a hardship, it causes suffering or unpleasantness. After all the hardship you enduring training for the marathon, you really hope that you’ll do well, or at least finish!
The word hard in hardship is a tip-off to its meaning: something that’s a hardship is hard. It could be hard work that you do for a larger goal — like training for the marathon — or it could be a situation that’s hard to endure. If you lose your job, you could end up experiencing financial hardship. Sometimes a hardship is something that just happens, like the hardship people suffer following a disaster.