This sentence always confuses me as I always read it as 'I do not want anyone to visit' as in I don't want anybody coming to visit me. How would the sentence structure differ if that is what I wanted to say? Would I have to specifically mention people motioning towards me something like 'Nie chcę nikogo przychodzi mnie odwiedzać'
it is genitive. Genitive is used in many things, but here it is used as direct object in negated sentence.
If a verb needs accusative as direct object, the case changes to genitive when the verb is negated. And a sentence with nikt/nikogo has to be negated.
And if you wanted to know: nikt/nikogo means "nobody, no one" , but English has one negation rule, while Polish has multiple negations, so "anyone, anybody" in negated sentences translate to "nikt"