All perfect praise be to Allaah, The Lord of the Worlds. I testify that there is none worthy of worship except Allaah, and that Muhammad, sallallaahu ‘alayhi wa sallam, is His slave and Messenger.
The Hadeeth of the Prophet, sallallaahu ‘alayhi wa sallam, is what is confirmed of him as sayings, actions, approval, moral characteristics, personal features, or biographies whether before or after he was commissioned as a prophet. With this definition, Hadeeth is a synonym of Sunnah; so the Sunnah is the Hadeeth and the Hadeeth is the Sunnah.
However, what the Fuqahaa’ (the Muslim jurists) mean by Sunnah is that which is opposite to the Waajib or Fardh [obligation], meaning what is desirable and recommended; it is what the Sharee’ah proved to be as just legislated but not an obligation. Rather, it is what is desirable and recommended.
On the other hand, the jurists may refer to the meaning of Sunnah as that which is opposite to Bidah (innovation), so they say: This is a Sunnah divorce and this is a Bidah divorce (i.e. an innovated divorce), so the Sunnah here is different from the Hadeeth which is more specific.
For more benefit, please refer to Fatwa 6823 and 3879.
Allaah Knows best.