Recipes are where all the magic happens with Chef; they are the secret sauce, the man behind the mask. They are the workhorses of configuring hosts with Chef. Recipes are scripts written in Ruby using Chef's DSL that contain the instructions to be executed on end hosts when the Chef client is run. Every time the client is executed on the end host, a few things happen:
The end host makes a request to the Chef server saying, "I need to do some work".
The Chef server looks at the requesting host's identity and determines:
Which recipes need to be run and in what order (the run list)
The computed configuration data for that host
This information is passed back to the end host along with the necessary artifacts it needs (recipes, templates, and so on).
The client then combines the configuration data with the recipes and begins to execute its run list.