A second mortgage works almost like a first mortgage. You can use it to lower your monthly payment, extract equity out of you home, or move from an adjustable rate mortgage to a fixed rate. You lender will redo the mortgage (charging you hefty closing costs) with a new term or balance.
For example, if you must have lower monthly payments, then the lender may take all the remaining principal that you owe and spread it out over the next 30 years. Your payment is lower, but you have to pay for a longer time.
Or, if you need a big lump sum now (to pay medical bills, for example) your lender would loan you the lump sum, add it to your mortgage principal and probably extend the mortgage for the next 15 or 30 years. You get the lump sum now, but have to pay for a longer time.
Or, if you have an adjustable rate mortgage, one in which the interest rate changes from time to time, you might want to switch to a fixed rate so you know your rate will never increase again.
You can work with your present lender or look for a new one. You will have to pay closing costs, so you won’t want to do this very ofter. And all this assumes you can find a lender who will finance this second mortgage.