A diathermy machine uses high-frequency electromagnetic energy to generate heat in tissues, primarily for therapeutic purposes like pain relief, muscle relaxation, and promoting healing, but also for surgical procedures like cutting and coagulating tissue.