Dear Student,
Pepsin enzyme is active in acidic pH only. They do not work in basic or neutral pH. The hydrochloric acid makes the acidic medium in stomach and hence convert inactivated form of pepsin into activated form. Pepsin is responsible for the digestion of proteins. It breaks proteins into proteases and peptides.
Regards