Type IV cancer occurs when cancer cells break away from the primary tumor and travel through the bloodstream or lymphatic system to form new tumors in other organs or tissues. This process, known as metastasis, can affect various parts of the body including the bones, liver, lungs, and brain.