This is a simple program demonstrating how sed performs substitutions.
In the first example, we say from lines to the end-of-file (denoted by the $ character), that a substitution is to be performed (denoted by the s preceding the first /). The substitution is defined as replace the first occurrence of program with PROGRAM working left to right.
In order to perform a global substitution, you must include the g character as part of the parameter list provided after the last slash.
The slashes are being uses as delimiters for /expression/replacement string/. However we can use different characters as a delimiter.