In this context, a nested scope is any region of code inside a compilation unit that creates a new scope. A module declaration creates a scope nested inside a compilation unit. A task declaration inside that module declaration is a nested scope within the module.
Sometimes the term lexical scope is used interchangeably with nested scope, but a nested scope excludes the scope that is the compilation unit. If you have the following code in a file:
int A;
task T;
int B;
endtask
module M;
int C;
task T;
int D;
$display(A,,,C,,D);
endtask
endmodule
The variable A is not declared in a nested scope. The first task T and the module M are not declared in a nested scope, but both create nested scopes. The variables B, C and D are all declared in nested scopes. The second task T creates a nested scope inside the scope M.
A reference is any mention of an identifier that is not a declaration. The $display statement references A and D. The compiler will search for A inside task T, then module M, and will find it the compilation unit. It will find C in module M and D in task T. It will do this search without even knowing where module M eventually gets instantiated.