A mortgage payment includes a fixed amount of "principal + interest". The interest portion is calculated each month based on the outstanding principal.
Every dollar of principal you pay early reduces the amount of interest you pay in every payment thereafter.
You are correct that you still have to pay the same monthly payment, but it is knocking off the immediate next payment (which is high interest, low principal), rather than knocking off the last payment (which is high principal, low interest).
Paying additional principal near the beginning of a mortgage thus makes a lot of sense (it eliminates interest on that amount for the next 360 months).