It was narrated that Abu Ayyub said:
"I heard the Messenger of Allah say: 'Whoever touches his sexual organ, let him perform ablution.'"
English reference: Vol. 1, Book 1, Hadith 482
Arabic reference: Book 1, Hadith 520
Read hadith from the major collections in the app, with prayer times and a Qibla compass. Free.