The boar was a wild, dangerous animal that caused panic amongst people.
Heracles decided to talk to his friend Pholus, who lived in a cave. The two sat, ate and drank, along with Pholus’s colleagues. Unfortunately Pholus’s colleagues did not know how strong wine is, and so got drunk. When drunk they attacked Heracles, who shot them at them with his poisoned arrows. They ran to the cave of the immortal Chiron for protection.
An arrow struck Chiron’s foot, and although it did not kill him, it caused huge pain. Indeed, the pain was so great that Chiron wanted to die, and asked that he have his immortality removed and given to Heracles, and he swap places with Prometheus, who had been chained to a rock and attacked by an eagle every day.
Before Prometheus was unbound, however, Chiron did tell Heracles how to catch the boar: he had to wait until winter, and drive it towards the snow. That would slow it, and Heracles could catch it. This Heracles did.
When Heracles took the boar to King Eurystheus, the king was so afraid he hid in his storage room and told Heracles to take it away. Heracles did, and three days later Eurystheus came out, ready with another task.