Guardrails sit between a model and the outside world. They can filter what a user is allowed to ask, check an output before it reaches a customer, block requests that touch restricted data and stop an agent from calling a tool it has not been approved to use.
The common mistake is treating a well written system prompt as a guardrail. A prompt is an instruction the model can be talked out of, while a guardrail is a check that runs in code outside the model, such as a rule that blocks a payment tool from firing without a human approval step. Guardrails and prompts work best together, not as substitutes for each other.