Probably a short in the electrical system, and a fairly major one at that. What causes it, don't you wish electrical work was that easy. Could be numerous items. Chafed wire, shorted alternator, nut fallen to a post and shorted it out. Solenoid failure is actually fairly low on the probability list, but still on it.
What you probably fried was the fusable link in the power wire. It is a last ditch fuse (actually a specially designed wire that is made to fail before taking out the whole wiring harness/truck). It isn't something that you want to just throw a new one in and hope all is good. For it to fry bad enough you heard it fry, it is on the edge of burning the whole harness out of the truck or burning the truck to the ground. More detective work besides just fixing the fried fusable link at the battery.