Wikipedia describes Photoshop as "a graphics editing program developed and published by Adobe Systems. It is the current and primary market leader for commercial bitmap and image manipulation, and is the flagship product of Adobe Systems." It can be used to retouch images or create raster (like a photograph) images from scratch.
Wikipedia describes InDesign as "a desktop publishing software application produced by Adobe Systems." Desktop publishing software is " combines an inexpensive personal computer and WYSIWYG page layout software to create publication documents on a computer for either large scale publishing or small scale local multifunction peripheral output and distribution. Users have flexibility to create complex page layouts that can incorporate body text, numbered footnotes, graphics, photos and other visual elements using software such as QuarkXPress, Adobe InDesign, Microsoft Publisher, Apple Pages, the free Scribus and (to some extent) any graphics software or word processor that combines editable text with images." In *my* opinion, InDesign is, to me, the best layout application out there.
Finally, Illustrator is defined as "Adobe Illustrator is a vector-based drawing program developed and marketed by Adobe Systems." Whereas Photoshop is raster-based (and can do rudimentary vector-oriented tasks), Illustrator is the opposite: it's vector-based and can do rudimentary raster-based tasks.
To clarify between Photoshop (raster-based) and Illustrator (vector-based):
"Vector graphics is the use of geometrical primitives such as points, lines, curves, and shapes or polygon(s), which are all based upon mathematical equations, to represent images in computer graphics. Vector graphics formats are complementary to raster graphics, which is the representation of images as an array of pixels, as it is typically used for the representation of photographic images. There are instances when working with vector tools and formats is best practice, and instances when working with raster tools and formats is best practice. There are times when both formats come together. An understanding of the advantages and limitations of each technology and the relationship between them is most likely to result in efficient and effective use of tools."
The most simplified response is: Photos are best edited with Photoshop (natch!) and logos (something that's made of shapes that are vector-oriented) are best served by Illustrator -- of course, if the image has been rasterized from a vector, then Illustrator won't be nearly as effective if the image had been left in its original vector format.)
There's a reason why the three are usually sold in a suite (Creative Suite 3: Production contains them all, plus Acrobat -- which you didn't ask about, but I'll throw it in the mix for fun and possibly to confuse you ;-) ) No one program can EFFECTIVELY do it all. That's not to say you couldn't do the same task or project in one program. You could create a page layout in any of the three applications you asked about. You could also layout a webpage too! But that's another project and application. My point, and I do have one, is that there's no magical cure-all application that I know of (or would trust professionally) that I'd use independently. I wouldn't compose my Masters thesis in InDesign, I'd use Word. I wouldn't create a company's logo in Photoshop, I'd use Illustrator, etc. ad nauseam.