Infants have two types of sucking: nutritional and non-nutritional. The former is something they do when they are hungry. The latter is something they do to soothe themselves. When babies reach five or six months of age, they are developmentally able to suck their thumbs. Prior to that, they are unable to reliably get their thumbs in their mouths. This is why pacifiers were invented.
If a baby has a big sucking need, it can be difficult for parents to satisfy his non-nutritional sucking needs with the breast or bottle alone. However, lots of babies spit out their pacifiers leading parents to think the baby doesn’t want it. This is not usually the case. Babies do not suck like we do. When a baby nurses or takes a bottle, his jaw moves up and down and his tongue moves back and forth to get milk. We call this the sucking (extrusion) reflex. Babies do the same thing when they suck on a pacifier, only in this case they inadvertently push the pacifier out of their mouths when sucking on it. In time, babies learn how to hold the pacifier in place with their lips, but in the beginning parents need to do this for them. If a baby truly doesn’t want his pacifier, he will turn his head or arch his neck to reject it.