The Restrict to ... buttons, also called the Axis Constraint buttons, are located on the Axis Constraints toolbar, which is off by default. You can turn it on by right-clicking on the main toolbar and selecting Axis Constraints from the pop-up menu. These buttons let you specify one or two axes about or along which the transform takes place.
Note: It's generally easier to use the Transform gizmos than these buttons; see Using Transform Gizmos. However, it is helpful to understand the concepts explained below.

Axis Constraint buttons
Only one of the four Axis Constraint buttons is active at a time. When a button is turned on, transforms are constrained to the axis it specifies. For example, if you turn on the Restrict to X button, you can rotate an object only about the X axis of the current transform coordinate system.
The axis or axes to which you’re constrained are highlighted in red on the axis tripod icon in viewports, or in yellow on the Transform gizmo.
The first three buttons constrain the transform to a single axis. The fourth button is a flyout, the Restrict to Plane flyout, that specifies double-axis combinations.
For example, if Restrict to YZ Plane is active, you can move an object only along the YZ plane, you can scale it only along the Y and Z axes, and you can rotate it about the Y and Z axes (or a combination of the two) but not about the X axis.
Note: Normally, axis constraints apply when using Snap. You can override this by turning off Use Axis Constraints in Snap Options.
As an alternative to using the buttons on the main toolbar, you can use the function keys F5 through F8 to select the four axis constraint buttons. F5 activates the X button, F6 the Y, F7 the Z, and F8 activates the double-axis flyout. Press F8 repeatedly to cycle through the three double-axis options.
Web Designer - offers freelance web design services, redesign, graphic design, content
management, web development and e-commerce.
LTD