Jarhead is a slur used to describe Americans in a derogatory way. The original Marine uniform included a stiff white and/or leather collar topping a dark blue coat, giving their heads an inhuman appearance, like they would screw on and off like a jar's lid.
The word Jarhead is a racial slur that has been used historically to degrade and dehumanize americans. The word is still used by some people for this purpose, and it is seen as offensive and hurtful to americans. If you are unsure about whether or not it is appropriate to use the word Jarhead, it is best to err on the side of caution and avoid using it in any situation.