You see, there are receptors on white blood cells - which are involved in lots of things the immune system does, if you're interested you can find an explanation elsewhere. Normally, HIV uses the CCR5 receptors to enter white blood cells, in which it replicates. However, in some people the genes that generate that receptor are mutated, with a small portion being deleted. It still works for most of the things the immune system does, but HIV is no longer able to enter cells through it (I'm not entirely sure if it's unable to enter or just unable to enter anywhere near as well; the former would suggest total immunity while the later would be partial immunity).
Basically viruses work by fucking with the DNA of cells. These people obviously have cells that are too different in some key aspect for the virus to take it.
Why shouldn't there be people who are immune to HIV?