Computer programs can be broken down into smaller sub-programs or subroutines to make the code easier to write, understand and maintain. Sub-programs are independent blocks of code that carry out specific tasks and can be programmed and tested separately from the main program. Functions are sub-programs that return a value, while procedures produce an effect without returning a value. Parameters allow data to be passed from the main program to sub-programs.