To hit a Home Run, is to hit the ball over the outfield fence in fair play. That would be to the right side of the third and left side of the first base line. A home run scores one point for the team, if no one else in on base. If the bases are loaded, with players on first, second and third base, that is a Grand Slam, scoring 4 runs. So, if someone does well, and enjoys success, you might say, "He hit a home run."
On the other hand, a baseball player may fail completely to even hit the ball. If a batter swings and misses 3 times, then he has struck out. So, when somebody fails, you may say, "He struck out."
There are other expressions connected to baseball, such as getting to first base, which means getting started with something, possibly a romantic relationship.
There are too many idioms derived from baseball to list here, and Wikipedia already has a good entry for it.