The Contiki netstack consists of four fixed layers - radio, duty cycling (RDC), MAC, and network. It uses a single packet buffer (packetbuf) to hold packets as they pass through each layer. Packetbuf attributes like addresses and RSSI are used to pass metadata between layers. Lower layers like MAC and radio use framers to convert between packet attributes and link-layer headers. When a packet is received, it moves up the stack from the radio layer through RDC, MAC, and network layers. When transmitting, it moves down the stack from network to MAC to RDC and radio.