With substitution of collateral, your lender agrees to accept the title to your replacement vehicle instead of the title to your totaled or stolen vehicle. You keep making payments as if your previous vehicle were never totaled or stolen.
Lenders are not required to do this in all states, but many times, if you have made your loan payments on time and you find a substantially similar vehicle, lenders may agree if state laws allow. You should ask your lender for more information if you are trying to substitute a vehicle after a total loss of the vehicle you were paying on.
State laws and insurance companies' guidelines for a substitution of collateral would determine if you would pay the taxes or not.
For example in Louisiana the Department of Public Safety (DPS) notes that in a substitution of collateral where the person's former vehicle is a total loss, no trade-in credit is ever allowable and taxes are due and owing on the fair market value of the new purchase.
Your state's DMV and / or insurance regulator should be able to advise you if taxes will be due after a substitution of collateral.