Check the terms of your mortgage.
If you are in a fixed-term mortgage, you can likely "over-pay" a fixed amount of the capital each year: typically 10%. Eg if you owe £300,000 on the mortgage, you can pay off an additional £30,000 this year. Next year you'd owe something like £260,000 so could pay off £26,000. You'd need to check the terms of your mortgage to see what this limit is. You can actually pay off more than this, but would become liable to pay an "early repayment fee" or similar, which is usually something like 3-5% of the mortgage amount. Note that this usually means you would need to re-finance the mortgage anyway
If you are not on a fixed-term mortgage than, in the UK at least, you are pretty much free to over-pay as much as you would like or refinance the mortgage.
If you are in a fixed-term mortgage, it is usually better to simply over-pay by that maximum allowed amount until the fixed period ends, at which point you can re-finance onto a mortgage that allows higher overpayments. This isn't always the case, though, depending on your interest rate, how high the early repayment charge is, and how much you are able to over-pay. At the very least, you're going to need to do some sums!
If you do choose to over-pay up to the limit, then you'd want to over-pay as much as you can at the start of the year (ie don't divide the over-payment by 12, pay it all as early as you can) to reduce interest payments. Then once you hit the limit, put the rest into a savings account: once you are out of the fixed term you can then pay the rest as a lump sum when refinancing.