Transcoding is the direct digital-to-digital conversion of one encoding to another. This is usually done to incompatible or obsolete data in order to convert it into a more suitable format.
In true transcoding, the bitstream format of one file is changed from one to another without its undergoing another complete decoding and encoding process. This usually is possible if the source and target codecs are sufficiently similar. However, support for this process very much depends on the case.
The most popular method of transcoding is to decode the original data to an intermediate format (i.e. PCM for audio or YUV for video), in a way that still contains the content of the original, and then encoding the resulting file into the target format.
Transcoding may also refer to the process of directly changing assembled software code to work on a different platform or operating system. While it is usually preferable to use source code and recompile the application, there are times when doing so is either impractical or impossible. This usually occurs when the source code is unavailable. One example, such as in the case of Wine, is taking Direct3D function calls and turning them into OpenGL calls.
Even though transcoding can be found in many areas of content adaptation, it is commonly used in the area of mobile phone content adaptation. In this case, transcoding is a must due to the diversity of mobile devices and their capabilities. This diversity requires an intermediate state of content adaptation in order to make sure that the source content will adequately present on the target device which it is sent to.

