The law offers artists the ability to take action against those who misappropriate their music. Legal action is almost only taken against commercial use, anything for business or making money, or for widespread promotional use. If you are an amateur and not making money off of it, it is generally not objectionable to use backing tracks. It isn't necessarily legal, but most artists are generally accepting that beginners/amateurs can cover their songs or use a backing track without jumping through legal hurdles. Some artists may ask for you to remove their work, but a lot are accepting and love hearing amateur music based on their works and don't mind. It's generally reasonable if the song is used as a "backing" and your rapping is the main focus.
If you ever start to do anything commercial, like selling your music or generating ad revenue from a YouTube channel, then you will need to get involved with someone who knows how to handle samples/backings/songwriting royalties. If you are literally just rapping over a song on the radio as a beginner looking to make something without being capable of handling the full production process, it's much like a band putting a cover song on a demo tape they give away - people are generally accepting of it and will rarely go as far as asking you to remove it.
ALWAYS make sure you give proper credit for the music you are using.