The process involves collecting DNA samples from infected individuals or pathogens, followed by extracting and amplifying specific DNA regions using techniques like Polymerase Chain Reaction (PCR). The resulting DNA profiles are then compared to identify similarities and differences, which helps in tracing the origin and transmission pathways of the disease.