It's a minor point that has to do with how compiling/linking works.
If you are just starting out, I wouldn't worry about it for now. It's not that important.
If you are still interested, what happens is, in C, if you use a function without first declaring it, it's assumed to return int. And this code will fail to compile
Because an int cannot be implicitly casted to a pointer.
SomeType *ptr = malloc(...);
Adding a cast
allows the code to compile, because you explicitly casting the "int" to a pointer, and it will fail at link time instead, because although malloc is implicitly declared, it is not defined.
SomeType *ptr = (SomeType *) malloc(...);