At first you have to apply for SEV at the nearest Malaysian Embassy at your hometown. Then do fly to Malaysia. Afterwards, you will be required to do medical examinations at an EMGS approved clinic and have to submit your passport to your institution. They will send your passport to immigration through EMGS to stamp your student pass on your passport and later you will get your passport back.
Hope the clarification will help you to understand the entire process. Have a good night.