With a doji there is no (or a very small) real body as it is formed because the buyers could not exert enough bullish pressure to push the price higher than the open, and the sellers could not exert enough bearish pressure to make the price go lower than the open. In essence the doji represents indecision.
The doji is often represented as a sign of a turning market. While it is common to see a doji at a market top or bottom, it is not wise to use it alone as a turning signal. Indecision means exactly that, the market is unsure of its future direction - therefore it should only be used as a warning, not a stand-alone signal. If the doji appears at previous support or resistance it is more likely to signal a potential reversal, however it occasionally appears out of the blue, and this should signal caution to the trader - but positions should not be liquidated without further confirmation. A common way to use this signal in an uptrend would be to use a close under the low of the doji to signal a top, and a close above the high of the doji to signal continuation, with the reverse for a downtrend.