When ‘Edit’ing a prim while using the numeric portion of the user interface, the prim may be rotated by setting the three rotation values labeled X, Y and Z.
These values are in degrees and each denotes a right handed rotation about the corresponding containment axis.
The Z rotation acts first, then Y, then X.
Changing X changes Z. They should be independent!
The Position values determine where the prim resides in the containment coordinates.
The containment coordinates for a newly created prim are the world coordinates.
After a prim has been attached to something, such as an avatar, then the coordinates are those of that thing.