Well, it is not accidental that various different sounds are represented by this letter. There are commonalities, and yet they still come out as different. Let me discuss each of them here.
There is the easiest one to produce, the so-called “tap”. This is a sound that is produced by simply hitting one’s alveolar ridge (the hard horizontal part one has behind the upper teeth) with the tip of the tongue. The Japanese R is like this. This is a very quick sound, and it cannot be prolonged, unlike M where you can vocalize it until you run out of breath. The Tagalog R is also the same. English also has this, but in different environments. English actually replaces other sounds with this sound, for example, the words “ladder” and “latter” are pronounced the same, with the middle consonant utilizing this sound, and so is “Adam” and “atom”.
Now what happens if you do this multiple times? Then you get a trill. This is a rather hard sound to make, and not all languages have these. This is hard due to the motor control that is needed to accomplish it, by having sufficient control on the tongue to make it vibrate up and down in a fast rate. I do not really know the exact motor process that is involved from the top of my head, since after all, I am not a phonetician. But yes, there are languages that use this sound, such as Spanish. In fact, Spanish has both the tap R and the alveolar trill R.
Not every trill is an alveolar trill. There are two more speech organs that can be trilled, and one of them still produces what is orthographically represented as an R. One can also trill the uvula, and this is the small flesh that hangs at the back of one’s throat. When this is trilled, it produces what is called a uvular trill, and this is also represented in various languages as R. French and Portuguese has this for example. I know this for a fact since both names of my adviser (who is French) and a co-author (who is Portuguese) has this sound.
There is one other R sound that I haven’t discussed. This is one of the mos rare sounds in the planet, and is very different from the ones discussed above. This is the retroflex R, which is done mainly by curling or bunching one’s tongue so that it forms a retracted position inside one’s mouth, accompanied by lip-rounding. Not a lot of languages do this, but it is featured in one language that is commonly spoken. This is also known as the English R. One other language that features this is Tamil. In fact, this sound makes a social distinction across the population, since apparently, only the educated can master this sound, and the laypeople will substitute this instead with an alveolar lateral sound, also known as L.