They give you a value for you truck and then subtract the amount of the loan from that and what is left over is your down payment. As long as you are not upside down, meaning you owe more than the truck is worth.
Basically, they're buying the old truck from you. They will make an offer for the truck. If you accept it, they will pay off the outstanding balance of the loan and use the remainder as going toward the purchase of the new vehicle. Of course, if they offer you less than you owe, then you will have to pay the balance due yourself. At the end of the transaction, the loan will be paid and the dealer will own the old truck, you will buy the new one from them and part of your payment will be the cash you got for the old one.