PIWI-interacting RNAs (piRNAs) are small non-coding RNAs enriched in animal gonads where they repress transposons to maintain genome integrity. Because of the highly tissue-specific and inherently adaptable nature of piRNA generation, as well as the diversity of piRNA sequences, elucidation of the mechanisms underlying the piRNA pathway is not simple. However, comprehensive computational analyses of RNA populations in diverse animals, including both piRNA mutants and wild-types, and the use of cultured cell lines where piRNA-mediated transposon silencing is pivotal for their life have eased this problem, providing beneficial advances in the piRNA field. In this review, we summarize recent findings about piRNA biogenesis in Drosophila and in mammals for comparison when necessary, focusing on intracellular events from transcription of piRNA sources to piRNA maturation. This article is part of a Special Issue entitled: Clues to long noncoding RNA taxonomy1, edited by Dr. Tetsuro Hirose and Dr. Shinichi Nakagawa.