In practice it is not used as an insulting term at all, but rather a quite friendly and tender one. Spanish people will call you guiri when 1- you are clearly not of latin\mediterranean origin (specially if you do come from northern Europe). And 2- you seem to be in need of help because your lack of knowledge of any aspect of the Spanish habits.
Spanish: “Sure! But please guiri, you can’t walk around Sevilla in summertime at noon without covering your head. You are going to get a sunstroke, dear!
"Do you even care about Spain's people, culture, language or history? No, all you guiris want is to come here to get drunk and sunburnt."