This Coin Acceptor works by compare the coin that already inserted in this sensor (blue color at sensor) with the coin that inserted at the front hole. If the coin is the same, the coin will accepted, but if coin is different, the coin will be rejected.
View More Coin Acceptor or Coin Sensor Tutorial with Arduino