Answer to this question should start from why we want the physical observables to be represented by linear operators.
Theoretical physics is about constructing a mathematical model which we hope describes the phenomena it's being modeled for and hence helps predicting stuff. In classical physics this mathematical model is based simply on the real numbers (at least locally) because of the nice behaviour of things. In quantum mechanics it's not the case. Experiments started giving discrete values as well as continuous values(such as energy of electrons,etc.). So there is a need for some class of mathematical objects that give equal importance to continuous and discrete cases.
We know linear operators have the property that they posses both discrete and continuous spectra which can act as the required class of mathematical objects. Hence we start identifying physical observables with appropriate linear operators.
Postulate 1. To each dynamic variable there exists a linear operator such that possible values are the eigenvalues of the operator.
We need some place where all the physics happens and where these operators act to give us the required results. So we construct a Hilbert space consisting of states of the system which we are observing.
In quantum mechanics the measuring process plays an important role. It will alter the state of the system it's supposed to measure. If we are going to perform two experiments one after other then there is a possibility that some of the information is changed.
The commutator of two observables $A$ and $B$ with operators $\hat{A}$ and $\hat{B}$ is defined to be, $$[\hat{A},\hat{B}]=\hat{A}\hat{B}-\hat{B}\hat{A}$$
A commutator is a mathematical construct that tells us whether two operators commute or not. Suppose $A$ corresponds to a dynamic observable $A$ and $B$ corresponds to the dynamic variableobservable $B$. Then the product $AB$ corresponds to measuring the observable $A$ after measuring $B$. If the measuring process is going to alter (disturb) the result of the next experiment in such a way that, measuring $A$ after measuring $B$ gives different values as measuring $B$ after measuring $A$ then we say they don't commute. Hence it means the commutator is not equal to zero. $$\hat{A}\hat{B}|\Psi\rangle\neq\hat{B}\hat{A}|\Psi\rangle$$ It is written in terms of commutator as, $$[\hat{A},\hat{B}]=\hat{A}\hat{B}-\hat{B}\hat{A}\neq 0$$
Otherwise it's zero. Which means that the two observables can be simultaneously measured. So a commutator tells us if we can measure two physical observables at the same time (which are called compatible observables) or not
TheIf we know the value of the commutator then it tells how the measurements are going to alter things. It gives more information such as the uncertainty.