What does it mean to "control for differences in factors" when looking at gun ownership and homicide rates?
There are various ways of controlling for other other factors.

Probably the most common is to include these control variable as additional variables in whatever statistical model you are running.

For example, you could run a multiple regression predicting homicide rate from gun ownership on a set of neighbourhoods. 

You could then run another regression model that included all the control variables. 

In both models you would get a coefficient for the effect of gun ownership on homicide rate. However, in the one with control variables, it would be statistically adjusted for the effect of these other variables.

There are lots of debates about how best to control for other factors and which factors to include. But that's the general idea.