Willy-nilly is an adverb that means without care or planning. Synonyms of willy-nilly include haphazardly, random, carelessly.
It can also mean something is done with or without a person’s approval. This definition is somewhat out-dated and related to the phrases original meaning. In the past willy-nilly meant willingly or unwillingly; or without consideration for those involved.
Today nil means zero or nothing, but archaically, nill meant the opposite of will. In the sense that a person was unwilling or a person refused something. The old phrase will you nill you is most famously used by William Shakespeare in The Taming of the Shrew.