Excavators are heavy construction equipment consisting of a boom, stick, bucket and cab on a rotating platform (known as the "house"). The house sits atop an undercarriage with tracks or wheels. Excavators are used in many ways:
Digging of trenches, holes, foundations are just a handful of uses.
A tractor is an engineering vehicle specifically designed to deliver a high tractive effort at slow speeds, for the purposes of hauling a trailer or machinery used in agriculture or construction,  a farm vehicle that provides the power and traction to mechanize agricultural tasks.