Functions are reusable blocks of code that can be called to perform tasks. There are two ways to define a function: with a statement or expression. Functions may accept parameters and return values. Variables declared inside a function have local scope, while parameters and the this keyword can refer to different objects depending on the context. Functions allow code to be reused and are fundamental to JavaScript programming.