what does the change of basis matrix actually do? (in both layman and mathematical terms) I have always known how to find the change of basis matrix but I do not know why am I doing so. 
 A: A matrix $A$ represents a linear transformation $T$ on a vector space, that is a transformation such that, for every two vectors $\vec v ,\vec u$ and for every two scalars $a,b$ is such that $T(a\vec v+b \vec u)=aT(\vec v) +b T(\vec u)$. For a basis $\{\vec e_i\}$ in the vector space, the vectors have a given representation by means of components $\vec v_e=(v_1,\cdots v_n)^T$, and $\vec u_e=(u_1,\cdots u_n)^T$ and the matrix $A_e$ that represents the transformation $T$ in this basis has entries such that the rows-columns product $A_e \vec v_e$ gives exactly $\vec u_e$ ( here $_e$ idicate the basis).
If we change the basis to a new basis $\{\vec g_i\}$ the components of the vectors change to $\vec v_g=(v_1',\cdots \vec v_n')$ and $\vec u_g=(u_1',\cdots \vec u_n')$ , so also the matrix that represents the same linear transformation $T$ must change from  $A_e$ to $A_g$ in such a way that $A_g \vec v_g= \vec u_g$ and the transformation $A_e \rightarrow A_g$ is your  change of basis for the matrix .
If $M$ is the matrix that represent the change of basis, you can easely see that $A_g=MA_eM^{-1}$
