It was narrated that Busrah bint Safwan said:
"The Messenger of Allah said: 'If anyone of you touches his penis, let him perform ablution.'"
English reference: Vol. 1, Book 1, Hadith 479
Arabic reference: Book 1, Hadith 517
Read hadith from the major collections in the app, with prayer times and a Qibla compass. Free.