While @Dnuorg Spu's answer is correct for the US (and Asia, afaik), it is not all that applicable for Europe. Around here, US-style PhD programmes are still more the exception than the rule. In many european universities, one applies directly with the professor before getting admitted into any sort of formal programme.
Essentially, what most professors do when they have openings for PhD students is the following:
- Talk to their own (good) master students (sidenote: a master is a minimum requirement for PhD admission in most places here)
- Failing that, contact friends and ask them for good master students interested in doing a PhD
- Failing that, write a job announcement to DBWorld or a similar mailing list
Step 3 usually brings in plenty of candidates. However, weeding out the bad from the good is time-consuming and error-prone, hence, most professors are not happy at all if they have to fall back to step 3.
Blind applications are usually ignored, simply because the chance that a given professor that you have applied to blindly currently has open funding and is looking specifically for somebody with your skill set is not very large.
I know that some times there are some published open positions, but in those cases mostly the competition is really fierce. Any advice, mostly based on experience, will be very useful.
My advice: give applying for some posted positions a try. Competition is fierce in numbers, but not necessarily in quality. We have had cases where we received 50+ applications, and decided to not hire anybody. Your chance is certainly better than villy-nilly mailing (or even worse, calling) professors out of the blue.