My Ford Ranger 1998 got too hot and I heard a pop.

I have a 1998 Ford Ranger automatic 4.0L engine, RWD. Yesterday I was driving on the highway and noticed that my truck was getting very hot so I stopped driving and turned it off. A few seconds before that there was a loud pop and I smelled something burned and my cabin got really hot. When I popped the trunk i saw a small tube on the side of the engine was shooting smoke out of it. For about 5 weeks before this it has been making a ticking sound whenever it's in drive or reverse. I included a video of what the sound sounds like. It stops when I put the truck in park. It also makes the sou

– My Ford Ranger 1998 got too hot and I heard a pop.