The code opens mylockfile as file descriptor 9, then applies the flock command on that file descriptor.
Any number is fine. I suppose a comparably high number avoids possible clashes with existing file descriptors.
The man page I just read uses 200.
Note that the last line is executed first: Before the script within parentheses is executed, the shell opens mylockfile.