Question: "Any help will be appreciated."
Answer: You may classify maximal ideals in $A:=\mathbb{Z}[x]/(x^2-1)$. A an ideal $I \subseteq \mathbb{Z}[x]$ is maximal iff $I=(p, f(x))$ where $p>0$ is a prime number and $\overline{f}(x)\in \mathbb{F}_p[x]$ is an irreducible polynomial (let $\mathbb{F}_p:=\mathbb{Z}/p\mathbb{Z}$, which is the field with $p$ elements). Assume $p$ is a prime, you get $A/(p) \cong \mathbb{F}_p[x]/(x-1)(x+1)$ and if $p=2$ you get
$$A/(2) \cong \mathbb{F}_2[x]/(x-1)^2$$
which is a local ring with one maximal ideal (the ideal $(x-1)$). If $p\neq 2$ you get
$$A/(p) \cong \mathbb{F}_p[x]/(x-1)(x+1) \cong \mathbb{F}_p \oplus \mathbb{F}_p$$
since $(x-1)+(x+1)=(1)$ is the unit ideal - the isomorphism is the chinese remainder lemma. $A/(p)$ has two maximal ideals $(x-1)$ and $(x+1)$. Hence the maximal ideals in $A$ are the ideals $(2,x-1)$ and $(p,x-1),(p,x+1)$ for $p\neq 2$ a prime number.
$$(*)\text{ }I=\mathfrak{m}_1^{l_1}\cdots \mathfrak{m}_d^{l_d}.$$
Taking products of maximal ideals give a class of nontrivial ideals $I$ in $A$.
Question: "Why do you believe ideals in $A$ are products of maximal ideals?"
Answer: If you instead considered $B:=\mathbb{Z}[x]/(x^2+1) \cong \mathbb{Z}[i] \subseteq \mathbb{Q}(i):=K$, this property holds for $\mathcal{O}_K \cong \mathbb{Z}[i]$. The ring $\mathcal{O}_K$ is a Dedekind domain, and this property holds in all such rings. You find a proof of this in Neukirch's book "Algebraic number theory".
Note: If you view the "decomposition" $Spec(A)=V(2)\cup D(2)$ you get
$V(2)$ has ring of global sections $\mathbb{F}_2[x]/(x-1)^2$. $D(2)$ has ring of global sections
$$\mathbb{Z}[\frac{1}{2}][x]/(x-1)(x+1)\cong B:= \mathbb{Z}[\frac{1}{2}] \oplus \mathbb{Z}[\frac{1}{2}].$$
There is a canonical map
$$\phi: A\rightarrow A_2 \cong \mathbb{Z}[\frac{1}{2}] \oplus \mathbb{Z}[\frac{1}{2}]$$
and you must study ideals in $\mathbb{Z}[\frac{1}{2}] \oplus \mathbb{Z}[\frac{1}{2}]$ and the map $\phi$. It is easier to study ideals in a direct sum.
This last isomorphism follows from the chinese remainder lemma, since the ideals $\mathfrak{p}_1:=(x-1), \mathfrak{p}_2:=(x+1)$ are coprime. These two ideals are the minimal prime ideals in $A$.
The ideals $\mathfrak{p}_1, \mathfrak{p}_2$ and the maximal ideals given above classify all prime ideals in $A$. An ideal $I\subseteq A$ has the property that $2\in I$ or $2\notin A$. If $2 \in A$ it follows $I$ is determined by its ideal $\overline{I} \subseteq A/(2)$. And the ideals in $A/(2)$ are $(0)$ and $(1+x)$, since $x^2=1$ is a unit. If $2 \notin I$ it follows $I\mathbb{Z}[ \frac{1}{2} ]$ gives all ideals in $\mathbb{Z}[ \frac{1}{2}]$. Hence the inverse image $\phi^{-1}(J)$ for any ideal $J \subseteq \mathbb{Z}[\frac{1}{2}]$ gives a class of ideals in $\mathbb{Z}$ not containing $2$.
Example: There is the following relation between ideals in $\mathbb{Z}$ and $\mathbb{Z}[\frac{1}{2}]:=S^{-1}(\mathbb{Z})$ with $S:=\{2^n\}$: An ideal $I\subseteq \mathbb{Z}$ satisfies $I^{ec}=\cup_{2^n \in S}(I:(2^n))$.
If $\phi: \mathbb{Z} \rightarrow \mathbb{Z}[\frac{1}{2}]$ is the canonical map it follows $\phi(3)=\phi(2^n3)$ for any $n$ since $2^n$ is a unit.
In general if $m:=2^np_1^{l_1}\cdots p_d^{l_d}$ with $p_i \neq 2$ it follows
the extended ideals $\phi((m))$ equal the ideal $(p_1^{l_1}\cdots p_d^{l_d}) \subseteq \mathbb{Z}[\frac{1}{2}]$. The inverse image of this ideal is
$$\phi^{-1}(\phi((m)))= (p_1^{l_1}\cdots p_d^{l_d}).$$
Hence the ideals $I$ in $\mathbb{Z}[\frac{1}{2}]$ are principal ideals on the form
$$I=(p_1^{l_1}\cdots p_d^{l_d})$$
with $p_i\neq 2$ primes and $l_i \geq 1$ integers. It may be easier to classify the ideals in the direct sum $B$. The prime ideals in $B$ are easy to classify. There is moreover a canonical injection
$$\psi: A \rightarrow A/\mathfrak{p}_1\oplus A/\mathfrak{p}_2 \subseteq \mathbb{Z} \oplus \mathbb{Z}$$
defined by $\psi(a+bx):=(a+b, a-b) \in \mathbb{Z}\oplus \mathbb{Z}$.
Hence $A$ is a subring of the direct sum $\mathbb{Z}\oplus \mathbb{Z}$, the subring $\mathbb{Z}\{u,v\}$ with $u:=(1,1), v:=(1,-1)$. Hence any ideal $I$ in $A$ is an ideal of the form
$$I:=(a_1u+b_1v, ..,a_lu+b_lv)$$
with $a_i,b_i\in \mathbb{Z}$. Any polynomial $f(x)\in \mathbb{Z}[x]$ may be written as $f(x)=f_1(x^2)+xf_2(x^2)$ and in $A$ you get
$$\overline{f(x)}=f_1(1)+xf_2(1)=a+bx$$
with $a,b\in \mathbb{Z}$. The ring $A$ is a free $\mathbb{Z}$-module of rank 2 on the generators $\{1,\overline{x} \}$. Under this correspondence the maximal ideals and prime ideals are the ideals
$$(2,x-1)=((2,2),(0,-2)), (p,x+1)=((p,p),(2,0)), (p,x-1)=((p,p),(0,-2))$$
and
$$(x+1)=(2,0), (x-1)=(0,-2).$$