Azazel's goal was to break the first seal of Lucifer's prison and trigger the apocalypse. To do this, he needed to find the "special children" - children who were born with an ability to resist demon influence. Sam and Dean were two of these children, and their mother was killed to ensure their vulnerability.
John Winchester spent years searching for Azazel, wanting revenge for his wife's death and believing Azazel was responsible for his sons' strange abilities. He finally caught up with him in the season 2 finale, where he confronted Azazel and was ultimately killed by him.