Humans are frequently looking for patterns and uniformity to support their choices and decisions. Whatever falls outside the expected can be said to be an anomaly. However, in many practical situations, the presence of anomalies can provide valuable insights, which can point out useful novelties. Thus, in predictive maintenance, for example, anomaly detection is useful to predict equipment failures and prevent losses at technical and financial levels. Most modern equipment has logging systems that allow to collect a high diversity of data regarding the equipment operation and working conditions. One such case is about several human activities. In both applications, looking for anomalies is a relevant task. The large amount of data, collected during a long period of time, makes the analysis by humans unfeasible. Data mining techniques can automatically extract models for anomaly and novelty detection from these data. These techniques, when used in predictive systems, are able to detect anomalies and issue an alert before they start, avoiding interruptions and breakdowns. After briefly describing the main aspects of anomaly detection and the most popular approaches and techniques, this article presents an overview of the main anomaly detection techniques used for predictive maintenance.