Hammer or Hanging Man candlesticks with bodies near the top of the candlestick, a short wick, and a long tail, typically around twice the length of the body. Hammers are usually green or white in colour while Hanging Mans are usually red or black in colour.

The Hammer pattern usually occurs at the end of a downtrend. This pattern shows that although there is selling pressure, ultimately, the stronger buying pressure pushed the price back up. This is seen as a rather bullish pattern, as the hammer pattern traps traders who shorted in the lower region of the candlestick. As such, to cover their shorts, it produces buying pressure.
Meanwhile, a Hanging Man pattern is one that forms at the end of the uptrend. It is a result of having a large sell off, but ultimately, buyers could push the price up again, possibly due to the market trending upwards, traders bought into the market confidently. However, this is a potentially bearish signal, since when the market falls later, it could jerk buyers out of their long positions.
Such Hammer and Hanging Man pattern usually signify a reversal in trend. Hence, when one encounters a Hammer pattern during a downtrend, they can possibly buy above the Hammer pattern for a reversal play. Also, when one encounters a Hanging Man pattern during an uptrend, they can possibly sell below the Hanging Man, for a reversal play, after some bearish confirmation.