If you select a brush and click on it once in one of the 2D views, the square handles at the corners will turn into circles, which can then be clicked and dragged to rotate the object. By default, it will rotate in 1° increments, but there is an option in preferences to lock it to 15° increments instead, which can then be toggled off by holding down alt (or shift, I don't remember). You can also rotate a selection more precisely by opening the transform dialogue with control + M. (Quick tip: sometimes, when rotating using the transform dialogue, your selection will rotate slightly on axis set to 0; to fix this, set those axis to 0.0 instead)
Sorry, I guess I wasn't being specific enough, my bad. What I meant is how do you make a object rotate in-game, like in the same way a door opens and closes.
Ah, to do that, you needed to use a func_door_rotating. If you want your object to rotate infinitely, simply set the distance to a huge number. There also exists a func_rotating entity, but this doesn't work in TF2 for some reason Edit: To rotate an object with the rotating door, parent the object to the door