The (double*) is a cast; whenever you see an expression of the form (type-name) expression, it means "interpret the result of expression as a value of type type-name".  In this case, it's saying "interpret the result of malloc as a pointer to double".  
Normally, pointer values of one type (such as char *) cannot be directly assigned to pointer variables of a different type (such as double *), so you have to use the cast expression to explicitly convert the source value to the target type.  Before the 1989 standard, malloc, calloc, and realloc all returned char * values, so you had to use a cast to assign the result to a different pointer type.  
The void * type was introduced in the 1989 standard as a generic pointer type that can be assigned to different pointer types without the need for a cast, and the *alloc functions were changed to return values of that type.  Explicitly casting the result of malloc is now considered bad practice.
The structure of the type in a cast expression closely matches the structure of the type in a declaration, just without the name of the thing being declared.  This is probably best explained with some examples.
int *p declares p as a pointer to an int; to cast the result of an expression to a pointer to int, you write (int *).  It's the same as the declaration, minus the identifier p.  
Here are a few more examples:
Declaration             Cast                 Type
-----------             ----                 ----
int (*ap)[10]           (int (*)[10])        Pointer to 10-element array of int
int (*f)(void)          (int (*)(void))      Pointer to function returning int
char **p                (char **)            Pointer to pointer to char
So again, the structure of a cast expression is the same as the structure of a declaration, minus the name of the thing being declared.