What is the difference between an output like 2 and 2. ?

I’m new to Mathematica and get puzzled by some of its output. When using List and operations like Part I sometimes get outputs like “2”, “3” etc and some other times I get “2.”, “3.”. Mathematica obviously interpret these as different, which I tested by using Part as input to other operations. So what is the difference? Thanks in advance.

2 is an infinite precision number. 2. is a machine precision number. You can see the difference by taking the square root.
Sqrt[2] returns Sqrt[2] as the result needs to be infinite precision. Sqrt[2.] returns 1.4141.

Take a look here: http://reference.wolfram.com/mathematica/tutorial/ExactAndApproximateResults.html