Although the exact definition of outlier depends on the context, we can roughly define it as observations that deviates too much from the other observations. There are 5 different class of definition. Detection of outliers can also be defined by these categories:
1) Distribution-based: originates from the assumption that observations follow some known distribution and the ones that deviates from this distribution are outliers. This assumes that we know the distribution beforehand but usually it is unknown.
2) Depth-based: Think observations as located layer by layer, then outliers are the ones that are on the outer layers.
3) Distance-based: Based on the idea that observations that are d> distance away from the >p percentage of others are considered to be outliers.
4) Clustering-based: Outliers are the ones which aren't included in the overall clusters.
5) Density-based: Based on the idea that density around an outlier is considerably different from the density around its neighbors.