The term operator is usually used to indicate a function that take an element of a vector space and gives an element of another (or the same) vector space. So the simpler example of an operator, that is also linear, is a square matrix that transforms a vector of a finite dimensional vector space in another vector of the same space. I suppose that you know that matrices, in general, does not commute, so that if we have two matrices $A$ and $B$ than $AB \vec x \ne BA \vec x$.
The commutator is the operator (a matrix) defined as: $[A,B]=AB-BA$.
In Quantum Mechanics the vector spaces used are spaces of functions and the (linear) operators take a function and give another function. If we consider a space of functions of one variable $f(x)$ ( with suitable conditions for differentiability), than the moment opertor $P=-i\hbar \frac{d}{dx}$ acts on a function as:
$$
-i\hbar \frac{d}{dx}f(x)=-i\hbar f'(x)
$$
and we can see that another operator as the position operator defined as:
$$
Qf(x)=x\cdot f(x)
$$
does not commute with $P$ and we have:
$$
[QP-PQ]f(x)=-i\hbar x f'(x)+i\hbar f(x)+i\hbar xf'(x)=i\hbar f(x)
$$
so that the commutator is a constant operator:
$$
[QP-PQ]=i\hbar
$$