Contextual bandits are a type of algorithm used in machine learning that focuses on decision-making in uncertain environments. These algorithms help in choosing the best action to take in a given context to maximize the overall reward. They are particularly useful in dynamic environments where the optimal choice may change over time based on the context.