  Let $C_{\ell}$ be the cycle of order ${\ell}$. The square of $C_{\ell}$,
denoted by $C_{\ell}^2$, is obtained by joining all pairs of vertices with
distance no more than two in $C_{\ell}$. A graph is called $F$-free if it does
not contain $F$ as a subgraph. Denote by $ex(n,F)$ and $spex(n,F)$ the maximum
size and spectral radius over all $n$-vertex $F$-free graphs, respectively. The
well-known Tur\'{a}n problem asks for the $ex(n,F)$, and Nikiforov in 2010
proposed a spectral counterpart, known as Brualdi-Solheid-Tur\'{a}n type
problem, focusing on determining $spex(n,F)$. In this paper, we consider a
Tur\'{a}n problem on $ex(n,C_{\ell}^2)$ and a Brualdi--Solheid--Tur\'{a}n type
problem on $spex(n,C_{\ell}^2)$. We give a sharp bound of $ex(n,C_{\ell}^2)$
and $spex(n,C_{\ell}^2)$ for sufficiently large $n$, respectively. Moreover, in
both results, we characterize the corresponding extremal graphs for any integer
$\ell\geq 6$ that is not divisible by $3$.
