I suppose there are various programs that could do it, but I chose to use iTunes, and I find it more wonderful than I ever expected to have all my favourite music on tap and playable in random order at the press of a button.
Currently I have more than 1500 tracks in my iTunes library, and they're quite carefully selected: in most cases I don't include whole albums but weed out the tracks I'm not so keen on. If a track comes up that I'm just not in the mood for at the time, I can easily skip to another one, but I don't need to do it very often.
I've gone off the whole idea of playing music an album at a time in the old-fashioned way. I prefer my own private radio station, which gives me constant variety but never plays a duff track. It sounds great. I haven't enjoyed music so much for a long time.