As noted above, there are myriad ways of going about getting a job after residency/fellowship. Unfortunately, most training programs do not offer a lot of information on how to navigate this process.
Recruiters will often contact residents, even as early as the middle of their training (I started getting them as a 3rd year surgical resident), with offers. They are not your friend and generally are not looking out for your best interests, but they do have job opportunities which you may not hear about otherwise.
Trade journals and national organizations generally have ads for open positions.
Your PD may get letters from other programs looking for new faculty; these are generally limited to academic positions but some well funded private practices may also send out letters/flyers to residency programs.
My colleagues were a good source of information as well; they would hear about jobs that they thought I might be interested in and I would return the favor. Let people know what you are looking for and where and they will help you.
Finally, do not dismiss the idea of cold calling or simply asking a hospital or corporation to help you start a practice. My new partner did this...pretty ballsy, but it worked and she was successful in starting a practice in a community that she wanted to live in.
I encourage people to start looking early...a year before you finish training is not too soon. You would be suprised at how long the process takes, from application evaluation, interviews, second interviews, contract negotiations, etc. Then you have licensing, credentialing, etc. to consider if you are moving out of state