The meaning of the idiom long shot is a low probability or likelihood of something happening. The phrase originates in the subject area of guns and marksmanship, where along shot is a very difficult one to make - the farther away the target is, the less chance there is to hit it.
Example 1: Winning the lottery is an extremely long shot, but I always say that you can't win if you don't play.
Example 2: I knew it was a long shot, but I asked her to go to dinner with me anyway - and she accepted.
Example 3: This Company is a long shot, but if we take a chance and invest now, we could be wealthy in a few years.
Example 4: Making it through grad school was a long shot for me, but I finally did it - with a family and a full-time job all the while.