Capgemini Interview Question

How does the malloc() function work internally? What are potential issues with its usage?