It all depends on the camera. With DSLRs it's easy, if expensive, all you have to do is buy a fish eye lens (or a converter, but the quality is such I wouldn't recommend it). With a digital compact, dependent on the brand you may be able to buy a converter that sits in front of the standard lens, or there are various homebrew projects floating around the net.
The final way is, if you have at least a reasonably wide angle lens on your camera, you can always do this in software with the likes of PhotoShop Elements or PaintShopPro. The results are not so good, but if you already have the software it's not going to cost anything extra.