How does the Uncertainty Principle work? In my textbook they have explained the Heisenberg's uncertainty principle using the example where you cannot measure the position of the electron using the photon because the wavelength of the photon needs to be small which then causes it to have high energy which would knock off the electron by collision. So my first question is isn't this the observer effect?
My second question is, if I were to measure the position (the point with highest probability) how does that cause an increase in the uncertainty in momentum? How does that work?
 A: The content of the Uncertainty Principle (UP) is apparently simple. Nevertheless, after its statement by Werner Heisenberg, it underwent an important mutation after Robertson's derivation of a general inequality for the product of the variances of the statistical distributions of the values of two non-commuting operators.
After Robertson's work UP relations are presented as a statement about the distribution of the values of two no-commuting observables, when measured in a given quantum state. As such, there is no reference to experimental disturbs and even the observer effect plays a minor role. Actually, the statistical interpretation of UP implies only that, if an ensemble of  quantum systems has been prepared in a given state $\left| 0 \right>$, independent measurements of observable represented by operators $A$ and $B$ would imply that the distribution of measurements of $A$ and $B$ should be subject to the inequality
$$
\sigma^2_A \sigma^2_B \geq \big| \dfrac{1}{2i} \langle 0[A,B] 0\rangle \big|^2.
$$
As such, the UP would say something quite different from the original content of Heisenberg's microscope. Therefore, it is usual to find, even here on PhysicsSE, vigorous denial that UP are directly connected with experimental errors.
However, Heisenberg's point of view should not be confused with the unavoidable presence of uncertainty in any practical measurement. It was stressing something else, which has a common origin in the non-commutation of some pairs of operators representing observables, but does not coincides with Robertson's statistical result.
This last point has emerged quite clear by a revival of interest, in the last  couples of decades,  for the physical content of UP with respect to the problem of (almost) simultaneous measurements of non-commuting observables.
Indeed, the non commuting of two operators, according to the basic postulates of QM implies that it is not possible to measure at the same time the two quantities. The reason is that one of the basic postulates of QM says that the effect of a measurement of a quantity A is to bring the quantum system into one of the eigenstates of the corresponding operator. However two non-commuting operators do not have a set of common eigenvectors, then the theoretical impossibility of a simultaneous measurement.
In recent years, people have started to analyze quantitatively such impossibility, asking questions about how good could be, on theoretical basis, a joint measurement of  two non-commuting observables. See for instance the paper by Cyril Branciard on PNAS and references therein contained.
Under such new viewpoint, it is possible to recover in a semiquantitative form the original Heisenberg's formulation, although the exact value of the "uncertainty" may be slightly different.
A: Such example is misleading (though very common in all quantum mechanics textbooks) as if focused the attention on the experimental details, seemingly addressing the uncertainty to practical measurements practices.
The uncertainty principle is solely due to the fact that two observables do not commute; whenever that is the case you may see that the product of their standard deviations must be at least equal to their non-zero commutator: whenever their non-zero commutator happens to be a constant (like in the case of position and momentum) this implies that the smaller the uncertainty on one, the bigger the uncertainty on the other (in order for the product to be a constant).
The uncertainty in quantum mechanics is theoretical, by definition, and not due to experimental errors.
