The big machine that dispenses merchandise when you deposit money is what is called a vending machine. When you deposit your money, it is checked by a currency detector, and then the machine allows you to get your desired item. You find them everywhere; in shops, malls, offices and in any other busy locations.
A Guide to Candy Vending Machines
Candy vending machines are one of the most popular types of automatic merchandisers. Some examples of candy include Skittles, Snickers, and M&Ms.