A value trap occurs when a stock appears to be undervalued based on financial metrics such as price-to-earnings ratios, but continues to underperform due to underlying business issues or external factors. Investors may be lured by the low price, only to find that the stock's problems are more significant than initially perceived, leading to prolonged poor performance. Identifying value traps requires careful analysis of a company's fundamentals and the broader market environment to avoid potential losses.