free() function and delete operator are used to deallocate the memory a pointer is holding.
free() function is used when the memory is allocated to the pointer by either malloc(),calloc() or realloc() function, whereas delete operator is used when the memory is allocated to the pointer using new operator.
/* free() is used to free memory assigned with malloc() or calloc() */
int *pointer1 = (int *)malloc(sizeof(int));
int *pointer2 = (int*) calloc (10,sizeof(int));
/* delete is used to free memory assigned with new operator */
int *pointer3 = new int;