Malay has certain way to tell the day/time.
In English, let say today is Wednesday. Yesterday was Tuesday, tomorrow is Thursday and the day after tomorrow is Friday.
HARI INI (today) hari Rabu,
KELMARIN (yesterday) hari Selasa,
ESOK (tomorrow) hari Khamis,
LUSA (the day after tomorrow) hari Jumaat,
TULAT (3rd day after TODAY) is Saturday.
SEMALAM [se-malam] in this context means last night, time from last sunset until today sunrise.
However there are in the certain part of Malaysia (central to Southern Peninsular) had different definition between SEMALAM and KELMARIN. In this region SEMALAM means Yesterday where KELMARIN means the day before yesterday. As you are learning the language, it is better for you to stick on the first rule as it is more linguistically relevant.