chmod 666 (rw-rw-rw-) explained

The owner can read and write; the group can read and write; others can read and write.

Octal
666
Symbolic
rw-rw-rw-
ls -l shows
-rw-rw-rw-

Who can do what

Class Read (4) Write (2) Execute (1) On a directory
Owner (u)YesYesNoList the file names, but not open them.
Group (g)YesYesNoList the file names, but not open them.
Others (o)YesYesNoList the file names, but not open them.

When to use chmod 666

Lets everyone read and write the file, but nobody execute it.

Rarely a good idea for files on disk, since any user can change them. It is the default that umask trims down for new files (to 644 with the usual umask of 022), and it is normal for device files such as /dev/null.

Commands

Set the mode with octal digits, or with the equivalent symbolic form:

chmod 666 path/to/file
chmod u=rw,g=rw,o=rw path/to/file

To apply it to every directory below a folder (and not to the files), combine it with find:

find path/to/folder -type d -exec chmod 666 {} +

chmod -R 666 changes files and directories alike, which is rarely what you want: directories usually need execute, regular files usually should not have it.

Work out any mode in the Chmod Calculator