The $n\times n$ lattice is the set $X_n :=\{(i,j)\mid 1\leq i,j\leq n\}$, partially ordered by $(i,j)\leq (k,l)$ if $i\leq k$ and $j\leq l$.
A linear extension of any poset $P$ (of cardinaluty $N$) is a bijectiive function $f:P\to \{1,\dotsc, N\}$ such that, whenever $x\leq y$ in $P$, $f(x)\leq f(y)$ in the usual order on integers.
Now in the case of the $n\times n$ lattice, a linear extension $f:X_n\to \{1,\dotsc, n^2\}$ gives rise to $n\times n$ matrix $A_{ij} = f(i,j)$. This is a matrix whose rows and columns are strictly increasing, and such that each of the integers $1,\dotsc, n^2$ occurs exactly once.
This is a special case of a more general notion of a Young tableau, which can be viewed as a linear extension of the poset $P_\lambda$ associated to the integer partition $\lambda = (\lambda_1,\dotsc, \lambda_l)$. The poset $P_\lambda$ is the set $\{(i,j)\mid 1\leq i\leq l, 1\leq j \leq \lambda_i\}$, with the same order relation as that defined on $X_n$ earlier. In fact $X_n = P_{(n,\dotsc, n)}$ ($n$ appears $n$ times).
The number of such linear extension are given by the hook-length formula of Frame, Robinson, and Thrall, a celebrated result in combinatorics. A great reference is the book Enumerative Combinatorics, vol. 2, by Richard P. Stanley. It's also explained in my book Representation Theory: A Combinatorial Viewpoint.