The Gateway decorator in NestJS marks a class as a WebSocket gateway. When you add @WebSocketGateway() above a class, NestJS knows to register it as a WebSocket server handler. Inside this class, methods decorated with @SubscribeMessage('eventName') listen for specific WebSocket events from clients. When a client connects and sends an event, the corresponding method runs, receiving the client and the message payload. The method can return data that is sent back to the client. This flow allows real-time communication between server and clients using WebSockets. The execution table shows each step from class definition, decoration, registration, client connection, event handling, to response sending. Variables like the gateway instance, client, and payload change state as events happen. Key moments clarify why decorators are needed and how event handling works. The visual quiz tests understanding of registration steps, variable states, and decorator roles. This helps beginners see how NestJS WebSocket gateways work step-by-step.