Considering racism didn't exist until the Trans-Atlantic slave trade yes it is taught, however, I will admit it's human nature to be weary of people different than you because before racism was a wide spread thing people discriminated based on ethnicity/nationality/religion things that are still discriminated against today, but it's all still learned because a child doesn't grow up knowing why someone is different from them until it's explained.