The chemical reactions and pathways involving cytokines, any of a group of proteins or glycoproteins that function to control the survival, growth and differentiation of tissues and cells, and which have autocrine and paracrine activity.