You can't do it, at least not in the sense you're thinking.
When a song is recorded, everything is recorded as a separate track, so you might have 10 tracks for the drums, 3 for guitars, 2 for vocals and 1 for bass.
When the track is mixed and recorded onto a CD, what you're hearing is where everything has been merged into a pair of stereo tracks. These stereo tracks contain *all* of the information. You can no longer separate an instrument from the mix. And there is no way you can rip a CD to the computer and get those tracks back - you need to have the original studio tracks to do it.
So basically, if you have a file with an extension like .mp3, .wav, .m4a, .aac, etc., then there's no way you're going to be able to do it.
So then you have to refer back to what BacteriumFendYoke said above.
And I would agree that what you're hearing on Youtube is not a drumless track for the most part, but their playing masks the original drums - it's not hard to do, especially if your playing is tight.