Microsoft interview question

How are the malloc and Free function in C is working? How will you construct one?