"She is standing next to him."
Translation:Ona stoi obok niego.
In the basic meaning, they're synonymous. "Przy" needs Locative, "obok" needs Genitive.
Using "przy nim" could allow for a more metaphorical interpretation of this sentence, like "She's always there for him". But it surely could be literal as well.
You're right. But it's only one of three Genitive forms for "him": the neutral "go", the emphatic "jego" and the 'needed-after-a-preposition' "niego" :)