For me, the only definitions that come to mind for the word "bob" are 1) "to move gently up and down" (usually on the surface of water) and 2) a "bob haircut." I think the only one you're likely to see on a test is the first one. Objects that float on the surface of water are described as "bobbing" when the motion of the water makes them sink and rise repeatedly. By extension, any abrupt down-and-then-up motion can be described as "bobbing."
The well-known term "bobbing for apples" refers to a game where apples are placed in water, and people try to get the apples out of the water without using their hands, by biting them. (I've never actually seen anyone play this game, but apparently it was popular at some point in the past.) The word "bob" describes both the motion of the apples (they bob up and down on the water) and the motion of the people's heads (they bob down into the water to try to get an apple, and then back up again).