Straight From Wikipedia...
Apple bobbing, also known as bobbing for apples, is a game often played on Halloween. The game is played by filling a tub or a large basin with water and putting apples in the water. Because apples are less dense than water, they will float at the surface. Players (usually children) then try to catch one with their teeth. Use of arms is not allowed, and often are tied behind the back to prevent cheating.
The tradition of bobbing for apples dates back to the Roman invasion of Britain, when the conquering army merged their own celebrations with traditional Celtic festivals. The Romans brought with them the apple tree, a representation of the goddess of fruit trees, Pomona.
When an apple is sliced in half, the seeds form a pentagram-like shape, and it is thought that the manifestation of such a symbol meant that the apple could be used to determine marriages during this time of year. From this belief comes the game bobbing for apples. During the annual celebration, young unmarried people try to bite into an apple floating in water or hanging from a string; the first person to bite into the apple would be the next one to be allowed to marry.
The custom is mentioned (along with apples suspended on a string) in 18th century Ireland by Charles Vallancey in his book Collectanea de Rebus Hibernicis.
Girls who placed the apple they bobbed under their pillows were said to dream of their future lover.