A teacher was injured in a shooting at an elementary school in Virginia on Friday, police and school officials said.