Pointers are always the same size for a given application (i.e. they are either all 32 bit or all 64 bit: you don't get mixed sizes. So in essence, a pointer is a pointer, it doesn't actually matter what it points to (well ... it does because the alignment of the type it points to can cause problems if you aren't careful).
A void pointer means it can accept any pointer type:
void foo(void *p)
{
printf("%p\n", p);
}
int main()
{
int x[10];
char c[5] = "abcde";
void* p = x;
p = c;
foo(x);
foo(c);
return 0;
}
So if you are planning on creating a function that can take different types of data, it can be handy to pass it to a void pointer parameter.
They are also useful when you want to return "anonymous" data because the caller must cast it to something useful to use it - just as you have seen with
malloc