I have recently begun to study algebraic geometry, coming from a differential geometry background. It seems that there is a deep link between complex manifolds and complex varieties. For example, one often hears that they are two different ways of looking at the same thing. Can anybody give a precise statement of this relationship?

The Wikipedia article is more technical than it should be, and for the reader in a hurry not all that well written. Here is a summary of the main points as best I understand them: Complex manifolds are analogous to smooth complex algebraic varieties, not to the singular ones. But that discrepancy is surmountable, because you can also have complex analytic varieties which can have similar singularities. Then the first and most important relation is that every complex algebraic variety is a complex analytic variety. Every Zariski open set is analytically open; analytic gluing maps are more general than algebraic ones; and the allowed analytic charts are more general than the allowed algebraic charts. Also every algebraic morphism is an analytic morphism, so you get a morphism between categories. But the connection is better than that because of the GAGA principle (globally analytic implies globally algebraic). My understanding of GAGA is very sketchy, but I think that the following is correct. Among other consequences of GAGA, a closed analytic subvariety of a proper (equivalent to compact) algebraic variety is algebraic. An analytic isomorphism between two proper algebraic varieties is algebraic. I would suppose that there is a similar principle for compact fibrations as well. So, Contrast all this with real algebraic vs real analytic. It is still true that (the real points of) a smooth real algebraic variety is a real analytic manifold. More strongly than in the complex case, although it is highly nontrivial, every compact real analytic manifold is real algebraic. But the real algebraic structure is massively not unique, even for a circle, and that makes all the difference. The other answerers in this thread, who are more expert in this topic than I am, had more information about why a compact complex manifold might not be a smooth projective variety. Just for clarity, I will restrict attention to the compact, smooth case. Also, you say "proper" rather than "compact" in the algebraic category because every algebraic variety is "compact" in the extremely coarse Zariski topology. An algebraic variety is proper if and only if it is analytically compact. The main use of the word proper is to emphasize that it is more general than projective, which means given by polynomial equations in complex projective space. There are two very different initial reasons that an analytic complex manifold might not be projective. It might not be Moishezon: A complex $n$manifold is Moishezon if it has $n$ algebraically independent meromorphic functions. (The number of algebraically independent elements or the transcendence degree of a field is called the Krull dimension. The meromorphic Krull dimension of a compact complex $n$manifold is at most $n$.) Or it might not be Kähler: A complex $n$manifold is Kähler if it has a Riemannian metric such that the covariant derivative of the complex structure vanishes. So to summarize what people said about compact complex manifolds (much of which is in the back of Hartshorne's book): projective ⇒ algebraic ⇒ Moishezon ⟺ bimeromorphically projective In addition, projective and algebraic structure and the Moishezon property are all unstable with respect to analytic deformation. And bimeromorphic equivalence preserves $\pi_1$. Taubes found compact complex manifolds that have the wrong $\pi_1$ to be Kähler; indeed they can have any $\pi_1$. Voisin found compact Kähler manifolds with the wrong homotopy type to be projective, disproving Kodaira's conjecture that every compact Kähler manifold can be deformed to projective. And, way out in left field, a leftinvariant complex structure (LICS) on a compact simple Lie group is a compact complex manifold that has no $H^2$ and can be simply connected too. Still, despite these beautiful nonprojective compact complex manifolds, it's generally easier to study projective examples. It's generally easier to sidestep analysis and do algebra instead. 


No one seems to have mentioned that if a complex manifold is an algebraic variety, then it has a nice compactification. More precisely, by Hironaka it can be embedded in a compact manifold such that the boundary is a divisor with normal crossings. In dimension 1 this is the only condition: a Riemann surface is an algebraic curve if and only if it can be compactified by adding a finite number of points. In particular, bounded holomorphic functions on it are constant (so the complex upper half plane is not an algebraic curve because zi/z+i is a bounded holomorphic function). So the two main obstructions to a complex manifold being an algebraic variety (or, at least, an algebraic space) are that it may not have a nice compactification (in the above sense) and it may not have enough meromorphic functions. To say that a complex manifold is an algebraic variety is a very strong statement. 


While every algebraic manifold is complex analytic the converse is far from true. If $M$ is a compact complex manifold then $a(M)$, the algebraic dimension of $M$, is defined as the transcendence degree of $\mathbb C(M)$ over $\mathbb C$, where $\mathbb C(M)$ is the field of meromorphic functions on $M$. The algebraic dimension is at most the dimension of $M$ and when the equality holds $M$ is called a Moishezon space. In general what one has is a variety $\hat M$ with $\dim \hat M = \dim M$, a projective variety $N$ with $\dim N = a(M)$, and analytic morphisms $\pi : \hat M \to M$ and $\varphi : \hat M \to N$ such that
It also has to be noted that from a topological point of view there are many more compact complex manifolds than compact algebraic manifolds. To be more precise, there are strong restrictions on the fundamental group of compact Kähler manifolds, while there is a deep result of Taubes that implies that every finitely generated group is the fundamental group of a compact complex $3$fold. Motivated by comments on Kuperberg's answwer, let me also mention that there were a conjecture by Kodaira claiming that any compact Kähler manifold is deformation equivalent to projective manifolds. While the conjecture is true in dimension two, as Kodaira has himself shown, it has been recently disproved by Claire Voisin. Compact complex manifolds which are not algebraic are not artificial beasts. Let me recall a very natural example of algebraic nature. Consider the quotient $X=SL(2,\mathbb C)/\Gamma$, where $\Gamma$ is a discrete cocompact subgroup. I think it was Mostow who proved that $X$ has no analytic hypersurfaces, which implies in particular $a(X)=0$. To see that $X$ is far from an algebraic variety, despite being algebraically defined, notice that there are $1$forms on $SL(2,\mathbb C)$ which are invariant by right translations and which are not closed. So they induce global holomorphic $1$forms on the quotient $X$ which are not closed. But on compact Kähler manifolds, and more generally on compact manifolds bimeromorphic to them, every holomorphic $1$form is closed. 


The Kodaira embedding theorem states that a compact complex manifold is projective  and thus algebraic by Chow's theorem  if and only if it has a Kaehler structure with integral Kaehler class. Kaehler manifolds are symplectic, and integral Kaehler class means that the cohomology class of the corresponding symplectic form $\omega$ lives in the second cohomology with $\mathbb{Z}$ coefficients. Note that the Kaehler class of a Kaehler manifold must be nonzero, because the symplectic volume $\int_X \omega^{n}$ must be nonzero. So maybe one way to find compact things that are nonKaehler and nonprojective is to look for things with zero second cohomology, because then they wouldn't even be symplectic. Perhaps there are examples of compact toric varieties that satisfy this? 


There is no enough room here to write the answer to your question. However, you can take a look at the appendix of Hartshorne and if you have time, a classical reference is Griffiths and Harris: Principles in algebraic geometry. However roughly speaking, the concept of positivity will tell you when a compact Kahler complex manifold is algebraic. 

