In the original sense it was a real goat. On the annual Day of Atonement, Israel’s high priest would lay his hands on a goat, symbolically transferring the people’s sins to it, then drive it away into the wilderness. The scapegoat fared better than the other Day of Atonement goat, which was sacrificed as a sin offering.
The word has come to mean “someone who takes the blame for others.”
See 666 (atonement).