Note that if $f$ is in no prime ideals, then it doesn't lie in any maximal ideals either. However, any non-trivial ideal is contained in a maximal ideal (by Zorn's Lemma). Therefore, $\langle f \rangle$ is equal to the whole ring $R$. However, $1\in \langle f \rangle$ implies $1 = fr$ for some $r\in R$, as desired.
According to the first answer of this this MO question and its commentary, the statement that any proper ideal in a unital ring is contained in some prime ideal is equivalent to the Boolean Prime Ideal axiom (weaker than choice)
, without which there are unital rings with no prime ideals whatsoever. Any non-unit elements in such a ring would provide a counterexample, so this axiom at least is necessary for the result to be true.
If you take the affine variety with its Zariski topology, it is (among other things) a topological space $V$.
Now given a topological space $V$, we can construct a new topological space
$X$ whose points are (by definition) the irreducible closed subsets of $V$,
and whose open sets are in bijection with the open sets of $V$ by mapping an open set $U$ in the latter to the set of irreducible subsets of $V$ which have non-empty intersection with $U$.
There is a map from $V$ to $X$ which sends a point in $V$ to its closure,
and by construction the topology on $V$ is obtained by pull-back from the topology on $X$ (i.e. the open sets in $V$ are precisely the preimages of the open sets in $X$).
So: two points of $V$ map to the same point of $X$ if and only they have
the same closure, and hence $V \to X$ is injective
iff $V$ is $T_0$ (i.e. two points with the same closure coincide); in this case $V$ is a topological subspace of $X$.
The map $V\to X$ is a homeomorphism if and only if every irreducible subset of $V$ has a unique generic point, i.e. if and only if $V$ is sober.
Affine schemes are sober, so this construction does nothing in the case of an affine scheme.
But affine varieties are not sober (unless they are zero-dimensional), and the construction $V\mapsto X$ in this case gives rise to the corresponding affine scheme. Given $X$, we can recover $V$ as the subset of closed points in $X$.
(If we want to be more sophisticated and think about structure sheaves, we can do that too: the structure sheaf on the scheme $X$ is the pushforward of the structure sheaf on $V$, and the structure sheaf on $V$ is the restriction of the structure sheaf on $X$.)
So there is a completely functorial, purely topological mechanism for moving from the affine variety $V$ to the affine scheme $X$, and back again, and so the two objects carry identical information. But sometimes it is convenient to work explicitly on $X$, so that all the generic points are available; it often simplifies sheaf-theoretic arguments (but any argument using the generic points can be rephrased in a way that works entirely on $V$, via the above discussion). And of course the affine scheme $X$ sits in a wider world of all schemes, not all of which correspond to affine varieties, or to varieties at all, and this is
often useful too.
Best Answer
Maximal ideals are always prime, so among your prime ideals will be the maximal ones.
What do maximal ideals in $A=\mathbb{C}[X,Y]/(Y^2-X^3+X+1)$ look like? Much like the primes, maximal ideals in $A$ are maximal ideals in $\mathbb{C}[X,Y]$ which contain the ideal $P(X,Y)=Y^2-X^3+X+1$.
The maximal ideals in $\mathbb{C}[X,Y]$ are all of the form $(X-a,Y-b)$ for some $a,b\in \mathbb{C}$. This is the kernel of the map $\mathbb{C}[X,Y]\rightarrow \mathbb{C}$ which sends $(X,Y)\mapsto (a,b)$. In this way, maximal ideals of $\mathbb{C}[X,Y]$ are identified with pairs $(a,b)\in \mathbb{C}^2$.
The maximal ideals which contain $P(X,Y)$ are the kernels of maps $\mathbb{C}[X,Y]\rightarrow \mathbb{C}$ which send $Y^2-X^3+X+1$ to $0$. Equivalently, $b^2-a^3+a+1=0$. In this way, maximal ideals of $A$ are identified with pairs $(a,b)$ which solve the equation $Y^2-X^3+X+1=0$; that is, with points on the solution curve.
What about non-maximal primes? As it happens, $A$ has only one non-maximal prime ideal, the zero ideal. Depending on how much commutative algebra you know, the easiest proof of this fact uses that the Krull dimension of $A$ is $1$. So in this case, the prime spectrum $Spec(A)$ consists of the complex solutions to the equation $Y^2-X^3+X+1=0$, together with a "generic point" (much like the affine line).
More generally, when a commutative ring $A$ is a finitely-generated $\mathbb{C}$-algebra, the set of maximal ideals $mSpec(A)$ will be in bijection with kernels of maps $A\rightarrow \mathbb{C}$, which in turn are in bijection with the solution set of some finite set of polynomial equations (this second bijection depends on a choice of finite presentation for $A$). The non-maximal prime ideals will all behave like "generic points", in that they are smeared out over some irreducible subvariety of $mSpec(A)$.