This is a demonstration of "literate programming." You are currently looking at a source code file, but instead of containing only code, it's a more elaborate document written with Markdown, a popular shorthand syntax for writing HTML.
Interspersed with the written prose are occasional blocks of code. In this case, the programming language being used is Ruby, in which the puts method can put a string of text into the terminal.
You can write whatever you want in the document using text, Markdown, or HTML. Then, when you're ready to start coding, you switch the document into "code mode" by typing three backticks in a row; this is called a fenced code block. Let's go!
puts 'hello world!'
Now you have some code. When you use the script to process this document as described in the README.md, it will strip away all the explanatory material outside the fenced code blocks and create a new file consisting of only the code sections which Ruby knows how to execute.
puts ':D'
This way of working emphasizes clear written documentation, which is a very important part of software development but is often hard to execute well.