There are many different styles of popular music - rock, jazz, R&B, country, heavy metal etc. - and you will find many big differences between these styles. The one thing they all have in common, though, is that they are tonal - meaning that the music centers around one particular tone, called the tonic or the 'one'.
When you hear the tonic in a melody, you feel you are 'home'. It is the most stable tone used in a melody, and usually it is the tone on which the melody ends. All melodies in tonal music can be represented by a numbering system in which each tone in the melody is assigned a number indicating its distance from the tonic.
To do this, take a major scale and simply number the tones in the scale from 1 to 8, where 1 is the tonic and the other tones ascend upward to 8, which is the octave. For example, the C major scale would be numbered like this: 1: C 2: D 3: E 4: F 5: G 6: A 7: B 8: C The first phrase of 'Mary Had a Little Lamb' in the key of C consists of the tones E - D - C - D - E - E - E. This would be represented as 3 - 2 - 1 - 2 - 3 - 3 - 3.
Notice that when you change keys, the names of the notes change, but the numbers stay the same. By hearing and understanding melodies in terms of their numbers, it becomes much easier to transpose melodies to different keys. In fact, understanding the relationships between the tones and numbers is a big part of what relative pitch is all about, and is a key skill for playing music by ear.
The next time you're listening to a song, first see if you can find and sing the tonic pitch. Then see if you figure out the numbers for some of the phrases in the melody of the song. It is possible to transcribe a melody in terms of its numbers without even knowing the key of the song.
Our game Paddle Pitch is designed to help you learn to hear the tones of major and minor scales in terms of their numbers. This will give you a foundation for building your own sense of relative pitch: https://trainer.thetamusic.com/en/content/paddle-pitch