Anomaly detection is an important issue, which has been investigated in various research fields and application domains. Many anomaly detection techniques have been developed exclusively for certain application domains, in contrast, others are more general. This survey aims to create a structured and comprehensive overview of the research on anomaly detection. First, we tried to introduce the concept of anomalies and types of anomaly detection. We have tried to classify anomaly detection according to their application and then categorized their techniques. For each application and technique, we have described key assumptions, which are used by the techniques to distinguish between normal and abnormal behavior. For each application, a basic anomaly detection technique has been provided, in the end; the differences among existing techniques in each specific category are discussed. Furthermore, we tried to describe the advantages and disadvantages of each technique in that field. In addition, we tried to bring some data sets that were used in some papers in order to test your methods with them. We hope that this survey provides a better concept of the various directions, which has been researched on that specific topic.