The s pointer contains the memory address where a character is stored.
The while (*s) checks that the character is not aka '\0'.
The putchar(*s++); increases the address to the next element with delayed action then the * dereferences and the character gets printed.
Delayed action means that the incrementation will not evaluate for the current instruction.
1 2 3
int a=5;
cout << a++; // will print 5!
cout << ++a; // will print 7!