A dangling pointer points to memory that has already been freed. The storage has been freed or variable been assigned the memory has it's life time ended, in other words storage no longer allocated. Now a pointer which is still holding the address of the same memory location which has been freed tries to access it causes segmentation fault to happen.
For example:-
int *x=(int *) malloc(4);
free(x);
*x=10; //THIS will cause the segmentation fault