A sound machine works by masking changes in background noise. How it is set up decides whether it does that or simply adds noise.
Masking, not drowning
The aim is to raise the noise floor slightly so that a door or a passing vehicle no longer stands out. It does not need to be loud to do that, and turning it up is usually counterproductive.
Placement
Between the sleeper and the source of the disturbance — near the door or the window — rather than beside the head. Close to the ear it becomes the disturbance.
Continuous or timer
A timer that stops in the night can wake you when it goes quiet. Continuous playback through the whole night is generally more effective, so battery life or mains power is worth checking.
Looping
Short sound loops become noticeable once you have heard the repeat, and then they are hard to ignore. Steadier, less patterned sounds hold up better night after night.