A capable model will attempt almost any request, including harmful or inappropriate ones, unless something stops it. Guardrails are the surrounding checks, on both the input and the output, that block disallowed content and keep responses within a system's intended scope.
They are separate from the model itself, so they can be updated without retraining, and they fail toward caution, refusing when unsure. The balance is delicate: too loose and harmful content slips through, too tight and the system refuses reasonable requests.