How exactly does physical therapy work?

Improve function. The goal of physical therapy is to restore function of affected parts of the body. It requires passive or active mobilization of groups of muscles or soft tissue ( tendons, ligaments )and treatment of the inflammation with different exercises, movements, technics or machines. They use heat or cold, electrical stimulation, ultrasound waves, weights, massage or others.
Modalities . Exactly~is relative. Majority of physiotherapeutic modalities ultrasound diathermy work by superficially or deep heating body fluid plasma infiltrates lymphatic or synovial fluid from stagnating inflamed areas. Massage moves fluids by mechanical friction. And electric stimulation galvanic current may in some configurations exchange ions through selective changing cell membrane permeability.