Here's some compilable code based on yours. I have no idea if it reflects what you're actually doing, but hopefully it will help you understand better.
The first call to malloc is in main(). This creates the room for the word "123456789".
The call to malloc() within the addidfword() function is there to create room for the structure of type IDFWORDS. I'm not sure what you're doing with these things, so it's difficult to judge if you're actually going the best way about things.
Anyway, see how you get on.
void addidfword(char *word, char *dname, IDFWORDS *C)
* This was: new=(IDFWORDS *)malloc(sizeof(IDFWORDS));
new = malloc(sizeof(*new));
new->word = word;
* Continue to use new
p = malloc(10);
addidfword(p, "dnameblurb", &c);