Subroutines Guide

Hello, I am new subroutines user. Do you have a programming guide on subroutines? I want to set up simple viscoelastic laws.