Scope rules determine where variables can be accessed within a program. There are three scopes: local, global, and formal parameters. Local variables are declared within a function and are only accessible within that function. Global variables are declared outside of functions and can be accessed anywhere. Formal parameters act as local variables within a function. It is best practice to initialize variables to avoid garbage values.