Generically, a "truck" could be almost any vehicle used by the fire department, but the term has become specialized over the years.
Originally, "engine" referred exclusively to "pump", the important tool for getting water to a fire. Today, "fire engines" are those vehicles of the fire department that pump water. The term "truck" is reserved for other types of vehicles, usually having one or more ladders.
Since Fire Engines and Fire Trucks perform significantly different functions at a fire scene, they are very different. Fire engines are equipped with hoses and water so that personnel can aggressively fight the fire. Fire Trucks are like the firefighter's tool box -- carrying ladders, rescue equipment and other tools to enable personnel to support firefighting activities.
The terms fire truck and fire engine are used interchangeably by some folks. They have similar meanings in their general applications. But toss out the "fire" and shorten the terms to truck and engine and now we're talking.
An engine is generally a "triple combination" rig, which is "old school" for something with a pump, a water tank and some hose (the "triple" part of the triple combination). This unit is the basic "fire engine" that we are used to seeing. Firefighters have a variety of hoses (called "lines") that they can pull and deploy. Some engines have a "hose reel" or two with a "hard line" on the reel. It's hard rubber and is non-collapsing. The reel allows it to be quickly deployed without having to pull it all off the reel. And it's easy to stow it when you're done! Recall that collapsible hose must all be pulled from the bed to charge it with water successfully. (Unless this is done, the kinks will prevent the flow of water - you can't get the wet stuff on the red stuff.) Some engines also have some kind of "master stream" appliance on the top for pouring out a big volume of water in a hurry in case they need to soak a major fire. And their hose bed will be full of (usually 2 ½ inch) line that will allow them flexibility in the way they deploy as an engine. (They can be used as a pump and a manifold.) The engine will also have a number of hand ladders hanging on it, too. And their compartments are full of stuff to support the deployment of the lines. Certainly there is a fat supply of first aid stuff. There is probably a "jaws of life" appliance on the unit. And some engines will have a fixed ladder that can be deployed from the vehicle. This ladder may or may not have a nozzle at the top. We good? Let's look at the truck.
The truck is a big boy with a fixed ladder. The ladder portion may be towed on a rig that is articulated, or the whole body of the truck might be one big piece so no one has to "drive" in the back like on the articulated unit. As for the ladder, it may or may not have a basket on the end for firefighters to stand in. And the ladders usually always have a nozzle (or two) on the thing so a master stream of some sort can be set up from a high point to help douse flames. Certainly the advantages of the ladder in rescue operations are a primary reason for the development of this big rig. There are usually outriggers that stabilize the truck when it is being set up to deploy the ladder. And there will be a pump in this unit to supply the water needed by the nozzle(s) on the ladder. Trucks usually don't have a water tank aboard like the engine. The truck compartments will have extra equipment for working big fires. A big gas-powered saw for cutting ventilation openings and large fans for smoke ejection can be on this rig. Hey, someone has to carry them. The squad isn't going to have the whole load. (The squad is the "carry all" for fire scenes. It has a lot of extra material and equipment for other emergency action from fire ground support to rescue operations to scene clean up.)
The main difference between the truck and the engine is usually cited as being that the truck is the rig with the big ladder. That's what makes the truck the truck. It's a bit more of a specialized piece of equipment than an engine, which is usually the first piece of equipment that is sent to a scene. The truck will be called out for structure fires and other activities where extra manpower is required. (The firefighters on the truck can support the firefighters on the engine even if the truck itself isn't being used directly.) Having worked with both an engine company and a truck company, the differences blur a bit in a situation where the sky is red, the smoke is thick and the water is streaming.