Hi frankie. Most shops get their CDs from distribution companies, who each look after a number of labels. The "Big Four" of these companies in the UK are EMI, Sony-BMG, Universal and TEN (The Entertainment Network), but there is also a whole host of smaller companies, such as Vital Distribution (mainly indie and some dance), Select (classical, jazz and easy listening), SRD (underground dance stuff) and so on. Some shops may also take a few self-produced CDs from individuals who have sent them demo copies, but this is pretty rare.
The shops will order expected high sellers by well-known artists as a matter of course as well as re-stocking sold out items, and will also consider recommendations from company reps who phone or visit regularly. These reps often arrange deals with the shops to persuade them (e.g. 25% discount for buying 10 copies of a certain title etc).
Hope this helps!