I am confused about some seemingly elementary ideas. From what I have understood, a rotation is just a specific class of co-ordinate transformations. If this is true, what exactly separates a rotation from the other transformations? I will give an example below.
Let us take an $n$-dimensional manifold (we have provided with a metric), to label points on the manifold we use have co-ordinates $$x^1,...,x^n$$ Let us transform the co-ordinates into new co-ordinates $$x'^k=x'^k(x^1,...,x^n) $$ where $k$ goes from $1$ to $n$. These functions are single valued, continuous and have continuous derivatives.
The elements of the metric (for the original co-ordinate system) are $f_{ij}(x_1,...,x_n)$. The elements of the new metric $f'_{ij}$ are related to the old as $$f_{ij} = f'_{kl}{a^{k}_{i}}{a^{l}_{j}}$$ where $a^{r}_{s}$ is an element of the Jacobian.
Now, what exactly are the restrictions that must be imposed on the elements ${a^{r}_{s}}$ to constitute a 'rotation'? I might have omitted some details, so you are welcome to make reasonable assumptions.
In the three-dimensional case, a rotation matrix is one whose rows (or columns) are orthogonal unit vectors, and whose determinant is $+1$. Geometrically, this means as follows: the orthogonality means there is no "shearing", the unit lengths mean there is no stretching, and determinant $= +1$ (as opposed to $-1$) means there is no mirroring/reflection. Those properties are what you would expect for a transformation that claims to be a "rotation".
I expect all of this can be generalized to the more general situation you asked about, but developing some intuition about the 3D case first is a good start.