Though it is always advised to stay invested in a SIP for a longer period to minimize the risk and achieve better results, you can stop the payment for a SIP anytime without any charges and withdraw the money. There are also no penalty charges for any miss on the due payments, the already invested money will stay invested in the market. You have the option to pause a SIP for a short period too in case, you are facing financial troubles.
Only in one case will your money be completely locked-in. If you have invested money in an ELSS fund, the money is locked for 3 years from the investment date and cannot be withdrawn under any circumstances.