Understanding the Cycles 'Script' node
The cycles script node connects OSL scripts into cycles, pretty much like an addon for the render engine. While you can use an OSL script to define the final appearance of the material, you can also use them as small steps that add custom noise or pattern inputs or custom math functions.

There is a self published e-book by Michel Anders called Open Shading Language for Blender: A practical primer. You will want some programming knowledge before reading it at it doesn't teach the core language.

You will also find that OSL is very similar to RenderMan scripts. Which is not surprising as it was created by Larry Gritz who worked on RenderMan at Pixar for several years before starting OSL. You will find that many RenderMan scripts are easily converted to OSL and any tutorials should also easily translate.

I have a github repository that has over 100 OSL scripts, including preview renders and node tree snapshots used to create them. Some of these scripts come from various websites including Michel Anders blog and the Blender Artists forum while others are conversions of older RenderMan scripts and a couple are OSL versions of quite complex node setups.

Some samples of scripts that define the entire material and connect to the output node -



These two samples use the same hexagonal pattern script within different node trees -