You can switch from a 30-year to a 15-year mortgage through a mortgage refinance. When you refinance, you're essentially replacing your existing mortgage with a new one, complete with a new term (length) and mortgage rate. This can make sense if you have been in your home for some time and can now afford a higher payment.
Keep in mind that you'll still need to pay closing costs — which average 3% to 6% of the loan amount — and that refinancing will restart the clock on your loan. That means if you refinance into a 15-year loan after paying your 30-year mortgage for 10 years, your total payback time will be 25-years.