It's usually a positive thing like a greeting. Ducks communicate with each other often, if one's been away for 5 minutes, they all do a "there you are, nice to see you again!"-greeting when they get back.
My three pet ducks do the "neck shake" when I pet them, very cute!