Both terms refer to collecting tax revenue, right? What's the difference then? I hoped the relevant Wiki pages would help but they didn't.
Collection of tax revenue in the UK is the responsibility of neither of those but of HM Revenue & Customs which has the status of a non-ministerial department.
HM Treasury is the UK's economic and finance ministry. Its responsibilities include advice to ministers on taxation policy and government expenditure. Confusingly, perhaps, the most senior minister at HM Treasury is known as the Chancellor of the Exchequer.
HM Exchequer is not a UK government department but a rather old-fashioned name for the Government's account into which is paid money from taxation and other sources and from which government expenditure is paid. The account is more commonly known as the Consolidated Fund.