Just looked up GAIN at Yahoo Finance. The company pays a dividend every month. (Most US companies pay every 3rd month.)
The Board of Directors also decided to pay a 'supplemental dividend' in June: the company brought in a lot of cash this spring, and they are sending it to shareholders. The Board could have decided to spend the money on other things - buying a smaller rival business, or upgrading their computer equipment, for instance.
For this company, what you are seeing happen looks to be their standard procedure. They are interested in sending cash to their investors' pockets. As a relative beginner in investing, that regular delivery of cash can be a reward: I'm doing this investing thing right.
Look for books and websites that offer advice on investing. Personally I like Jim Cramer's Get Rich Carefully (book) for its description of the background research needed to make this your full-time job, and The Motley Fool (website) for articles aimed at beginners describing good and bad points of individual companies / stocks.
There is a LOT to learn, do not be embarrassed to create a simple set of 'What I will do if X happens' guidelines while you are figuring it all out. You don't have to make the best possible choice every time, you just have to be right more often than you are wrong. Study and research will guide you in that direction.