Used when someone is attempting something with great determination and effort. He's swinging for the fences to get that scholarship.
Pro Tip 2/3
Big Risks
Implies taking significant risks to achieve a goal, often with an all-or-nothing approach. She's swinging for the fences by investing all her savings into the new venture.
Pro Tip 3/3
Not Literal
Even though it originates from baseball, it's often used in non-sporting contexts to express striving for great success. In his career, he always swings for the fences.