Lexical scope, also known as static scope, is a convention in programming where the scope of a variable is determined by its position within the source code, and nested functions have access to variables declared in their outer scope. This allows for predictable and understandable variable resolution, as opposed to dynamic scope, which resolves variables based on the call stack at runtime.