Let $A$ be a ring ,$X$ be the set of all prime ideal of $A$.For each subset $E$ of $A$,let $V(E)$ denoted the set of all prime ideals of $A$ which contain $E$.
we have:
$V(0)=X,V(1)=\emptyset$
$V(\bigcap_{i \in I} E_i)=\bigcup_{i \in I} V(E_i)$
$V(E)=V(a),\text{if a is the ideal in A generated by}~E$
$V(ab)=V(a)\bigcup V(b) \text{for any ideals a,b in}~A$
Let $k$ be any field,By $\mathbb{A}^n(k)$,we shall mean the cartesian product of k with itself n times.If $F \in k[x_1,...,x_n]$,the set of zeros of $F$ is called the hyper-surface,and is denoted by $V(F)$.
we have:
$V(0)=\mathbb{A}^n(k),V(1)=\emptyset$
$V(\bigcap_{\alpha} E_{\alpha})=\bigcup_{\alpha} V(E_{\alpha})$
$V(S)=V(I),\text{if I is the ideal in k[x_1,...,x_n] generated by }~S$
$V(PQ)=V(P)\bigcup V(Q) \text{for any polynomials P,Q in k[x_1,...,x_n]}$
It seem that prime spectrum and affine space are the same things,
then a polynomial can be regard as an ideal,
Zariski topology can be regard as affine algebraic set.
How to explain the hyper-surface and dimension in the algebraic view?and why they are look like a same thing.
This is exactly the viewpoint of modern algebraic geometry, although a prime spectrum is not quite the same thing as an affine space, even for $\mathbb{C}[X]$. This has one prime ideal other than $(X-z)$ for $z\in \mathbb{C}$, namely $(0)$. The set of primes containing $(0)$ is, of course, all of them, so the prime spectrum of $\mathbb{C}[X]$ is a very topological object from $\mathbb{A}^1(\mathbb{C})$. We call $(0)$ a generic point because its closure is all the spectrum of $\mathbb{C}[X]$. Such points are the most glaring difference between prime spectra and affine spaces. (In higher dimension one gets even more interesting points: think of the prime $(X^2-Y)$ in $k[X,Y]$. This is a single point associated to the whole curve $X^2=Y$!)
The natural notion of dimension in commutative rings is the Krull dimension, the length of the longest ascending chain of prime ideals. Considering that $0$ is the only prime of $\mathbb{C}$ and $0,(X-z)$ are the only primes of $\mathbb{C}[X]$, you might hypothesize that the Krull dimension of $\mathbb{C}[X_1...X_n]$ is $n$, and you'd be right. As to hypersurfaces, and indeed all subvarieties of affine space, they correspond in the algebraic picture to quotient rings: a variety $V\subset \mathbb{A}^n$ is associated to its ring of functions $k[V]=k[X_1...X_n]/I(V)$.
The gist of the story is that affine varieties are exactly the same thing as commutative rings, and though as I've said that's only approximately true in the classical picture it's exactly true in the modern foundation of algebraic geometry on "schemes." This identity would make the "geometry" in algebraic geometry trivial-but not all varieties are affine. You've probably met projective ones, for instance. It's as far as it could possibly be from the case that a projective variety is determined by its ring of functions, and so it's in such varieties that geometry begins to become really interesting.