malloc() tries to allocate the size of memory that you asked for. The function doesn't know how the parameter is transferred, but rather it's value alone.
For example, if sizeof(int) is 4, then:
int* ptr = malloc(sizeof(int) * 5);
and
int* ptr = malloc(20);
are essentially the same. In both the function will get a value of 20 as a parameter. The same will happen if you call malloc like this:
size_t a = 20;
int* ptr = malloc(a);
Therefore, if it succeeds (i.e. doesn't return NULL), it will allocate a contiguous block of memory, with at least the size that you asked for.
All that is true regarding to virtual memory. Meaning, you'll access the memory with a continuous index. Physical memory depends on the way the OS manages you're memory.
If, for example, your OS holds memory page frames (blocks of physical memory) in size of 4kb only, and you ask in malloc for more, although your virtual memory will be contiguous, physical memory might not.
All of that has to do with a wider subject that is called memory management. You can read about the way that linux chose to deal with it here.