What does it mean to "control for differences in factors" when looking at gun ownership and homicide rates? What does it mean "with control for differences in factors" in the sentence :

"Several studies used cross-sectional analyses to detect a positive relationship between the prevalence of gun ownership at the neighbourhood, county, regional or state level and homicide rates, with control for differences in factors associated with homicide (e.g., urbanization, race/ethnicity, unemployment, poverty, crime, and alcohol use)."

What did they do to those factors when they "control" them ? 

The full report can be found here, if that helps for context: https://ajph.aphapublications.org/doi/full/10.2105/AJPH.2013.301409

Does that mean that they took in consideration all those factors (urbanization, race/ethnicity, poverty, etc.)  in the method to minimize the impact those factors have in the results of the factor that matters the most to homicide rates in  this study, in this case gun ownership? If so, how can it be done? An illustrative example is enough.
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.