In its original format, one player creates a sequence of four colored pegs, chosen from six available colors. The second player tries to guess the pattern in 10 or fewer turns. The second player makes a series of guesses about what the pattern might be, and each time the first player gives feedback indicating how many pegs in the guess are of the right color and in the correct position, as well as how many pegs are of the right color but in the wrong position. That feedback comes in the form of small colored pegs.
For example, assume the first player's hidden sequence is four red pegs, and the second player guesses a red peg followed by three blue pegs. The feedback would be just one peg, of a color indicating a correct guess in the correct location. This feedback doesn't say which peg was correct, however; the second player has to figure that out with subsequent guesses. If the second player's second guess was four blue pegs, the feedback for that turn would be zero - none were correct. This would show that in the first guess, the red peg was the correct color in the correct spot.