The 3rd parameter, 0666, is also called the mode, but as noted above, it specifies the file access permissions.
The leading 0 means 0666 is interpreted as an octal number (base 8).
To represent one of the 8 digits in octal only 3 bits are needed. Converting octal to binary means each octal digit becomes 3 bits.
In binary 0666 would be
6 6 6 (octal) 110 110 110 (binary) rw- rw- rw- (permissions)