How did a "B-side" songs make the charts?

Hey! that’s pretty cool. I’m a musician (or used to be) and I was stumped. In my type of music we don’t see the charts too much so I guess I never learned much about how they ARE ranked…let alone how they USED to be ranked.:smiley: