J’écoute de la musique en faisant mes devoirs. – I listen to music while doing my homework. Il s’est cassé la jambe en jouant au rugby. – He broke his leg by/while playing rugby.
The present participle is like '-ing' in English.