Why are there 3N-6 degrees of freedom in molecules?
You have N atoms, each atom can be described by a set of cartesian coordinates (x,y,z). So for each atom we have 3 degrees of freedom which means we end up with 3N degrees of freedom. If we look at an isolated structure without any external field or anything like that then only the relative position of each atom to the others matters. So we can get rid of some degrees of freedom. Translating every atom in the same way into x, y or z direction won't change anything, so we can reduce the degrees of freedom by 3. Rotating it around x, y or z doesn't change anything either, so we are reducing by another 3, so we end up with 3N-6.