The simple description you'll find in most linguistic descriptions of Japanese is that the Japanese r is what is called an alveolar tap and written as [ɾ] in the International Phonetic Alphabet, which is also the Spanish r in pero (not the trilled r in perro). The reality is more complicated because Japanese only has one liquid phoneme. The fact that there is no separate l sound in Japanese means that there is a bigger phonetic space that the r sound can occupy. What ends up happening is that the Japanese r can be lateralized, that is, part of the airstream is through the sides of the tongue rather than through the middle of the mouth. A lateralized tap which results in this case is written as [ɺ]. This ends up sounding like l, which is technically known as a lateral approximant because the airstream is only through the sides of the tongue.
The more complete description of the Japanese r is that it is a tapped alveolar consonant that can range between a completely central [ɾ] and the lateralized [ɺ], with different degrees of lateralization. All will be interpreted as the Japanese r, and speakers tend to use [ɾ] after vowels, with lateralization likely to creep in if the r comes at the beginning of an utterance or after an n.
I'm a native speaker of Korean by the way, and while at the abstract phonemic level we also have a single l/r sound represented as ㄹ in the Korean alphabet, we do distinguish [ɾ] and [l] between vowels. 아리 ari uses the tap [ɾ] and 알리 alli uses [l] because that's how double ㄹ is pronounced. It's a similar distribution to the tapped and trilled r's in Spanish, where trilled r's between vowels can be analyzed as double r's.
The more complete description of the Japanese r is that it is a tapped alveolar consonant that can range between a completely central [ɾ] and the lateralized [ɺ], with different degrees of lateralization. All will be interpreted as the Japanese r, and speakers tend to use [ɾ] after vowels, with lateralization likely to creep in if the r comes at the beginning of an utterance or after an n.
I'm a native speaker of Korean by the way, and while at the abstract phonemic level we also have a single l/r sound represented as ㄹ in the Korean alphabet, we do distinguish [ɾ] and [l] between vowels. 아리 ari uses the tap [ɾ] and 알리 alli uses [l] because that's how double ㄹ is pronounced. It's a similar distribution to the tapped and trilled r's in Spanish, where trilled r's between vowels can be analyzed as double r's.