Multiple legendary origins of Tar Heel. One already explained. Another is that during a civil war battle all other regimens retreated except for one from NC. The description given to the commanding officer was they held fast as if tar were stuck to their feet. The officer replied, "God bless the Tar Heel boys!"
For the ram mascot there is actual historical record. In 1924 the school wanted a live mascot like Georgia's bulldog. One of Carolina's full backs was nicknamed "the battering ram." So they decided to get a live ram. First game appearance for the ram was against VMI in November 1924. Late in fourth quarter the score was tied at nil. Before attempting a field goal Carolina kicker rubbed the ram's head. He kicked the fg, we won, and ram been mascot ever since. #GDTBATH