In Next.js, schema definition is done by creating an object that describes the shape and rules for data. We import a library like zod, then define a schema object with fields such as name and age. Each field has a type and validation rules, for example, name must be a string and age must be a positive integer. After defining, we export the schema to use it elsewhere. When validating data, we call parse() on the schema with the data. If the data matches the schema, validation passes. If not, it throws an error. This helps ensure data is correct before using it in the app.