A distributor's job is to move products to stores. They have contracts with different stores and can place products in their shelves. You can not, for instance, make a game, print the boxes and then get Babbages or some other software store to sell it for you. You need to have a distribution contract with their company. Publishers sometimes have distributors that they use, and sometimes they distribute their own products.
Distributors sometimes work a little like a publisher.
Some distributors will give money to help develop a product. Some of them also have artists to design box art, packaging and advertising. As I understand it, you can usually get a better deal in a percentage contract from a distributor than a publisher since there are fewer middlemen and they are less in the business of making a profit off of small developers. There was a brief time when venture capitalists were actually giving money to developers to try to make games. As I understand it, this has completely or almost completely stopped.