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?

7$\begingroup$ You may find the Wikipedia article enlightening: en.wikipedia.org/wiki/Algebraic_geometry_and_analytic_geometry $\endgroup$ – Qiaochu Yuan Nov 10 '09 at 17:37
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, if you make compact analytic varieties algebraically, you can't escape from the algebraic class some of the main constructions of complex manifolds do not escape from the algebraic class. (But not all: deformations and infinite group actions can escape.) All projective analytic varieties are algebraic, and in dimension 1 all compact curves are projective. Moreover, there are limited ways for a compact analytic manifold to avoid being projective, by Moishezon's theorem and Kodaira's theorem. In practice, then, most of the complex manifolds that people make are algebraic. Also, most of the analytic calculations on a proper algebraic variety are algebraic: Many global calculations are algebraic by GAGA, and many local calculations are algebraic just by truncating Taylor series.
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
projective ⇒ Kähler ⇒ symplectic ⇒ nonzero $H^2$
algebraic ⇒ nonzero $H^2$ (exposited by David Speyer)
Moishezon and Kähler ⟺ projective (Moishezon)
Kähler and integrally symplectic ⟺ projective (Kodaira)
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.

8$\begingroup$ "In practice, then, most of the complex manifolds that people make are algebraic". I guess a natural source of compact complex manifolds that aren't in general algebraic are the complex tori C^g/L, with C the complexes and L a lattice. For g>1 these are "rarely" algebraic, and it's very wellunderstood when they are algebraic (Riemann forms etc). $\endgroup$ – Kevin Buzzard Nov 10 '09 at 19:28

1$\begingroup$ Another such class is the K3 surfaces. Two complex dimensional simply connected manifolds with trivial canonical class. $\endgroup$ – Charles Siegel Nov 10 '09 at 21:40

$\begingroup$ The lesson from these examples (which I did not adequately appreciate) is that GAGA does not particularly apply to analytic deformations. My "most" remark is correct, I think, but not overwhelmingly so. I know one interesting construction of nondeformation type: A leftinvariant complex structure on a compact simple Lie group. These are generally not projective and don't even have H^2 as Kevin asks below. Could any of them be proper algebraic? $\endgroup$ – Greg Kuperberg Nov 10 '09 at 21:54

$\begingroup$ It's best to approach this as rule + exceptions, I think, rule being GAGA and exceptions being a finite (!) list of reasons why GAGA breaks down. $\endgroup$ – Ilya Nikokoshev Nov 10 '09 at 21:56

$\begingroup$ The only compact algebraic groups are the abelian varieties. So, unless your Lie group is (S^1)^{2n}, these can't be algebraic. $\endgroup$ – David E Speyer Nov 10 '09 at 22:43
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
 $\pi$ is bimeromorphic;
 the generic fiber of $\varphi$ is irreducible;
 the field of meromorphic functions on $M$ is the same as the one of $N$. More precisely: $\varphi^* \mathbb C(N) = \pi^* \mathbb C ( M)$.
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.

$\begingroup$ So if I understand correctly, a Moishezon space is bimeromorphically equivalent to a projective algebraic variety, and bimeromorphic equivalence is like birational equivalence but more general? Could any of Taubes' nonKahler manifolds be proper algebraic? (I would suppose rarely at best, but I don't know.) $\endgroup$ – Greg Kuperberg Nov 10 '09 at 22:24

1$\begingroup$ Yes, Moishezon spaces (as well as proper algebraic spaces) are bimeromorphically equivalent to smooth projective varieties. Yes, bimeromorphic is a generalization of birational. Bimeromorphic maps induce isomorphisms on fundamental groups, so as soon as there are obstructions coming from the fundamental group, the example is not bimeromorphic to any proper algebraic variety. $\endgroup$ – Jorge Vitório Pereira Nov 10 '09 at 22:41

2$\begingroup$ Indeed, Voisin has constructed, in every dimension at least 4 (complex dimension), compact Kaehler manifolds that do not have the homotopy type of a projective manifold. I think dimension 3 is still open. She has also constructed, in even dimensions at least 8, compact Kaehler manifolds that are not even birational to something with the homotopy type of a projective manifold. So this disproves Kodaira's conjecture as well as a birational version of Kodaira's conjecture. See arxiv.org/abs/math/0410040 and arxiv.org/abs/math/0312032 $\endgroup$ – Kevin H. Lin Nov 10 '09 at 23:15
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?

$\begingroup$ A projective structure on a toric variety is given by a rational convex polytope structure on its fan. When its fan is complete but nonregular, the variety is proper but not projective. But I don't know how to compute H^2 of this, although I'm sure lots of people do. However, an evendimensional simple Lie group such as SU(3) has leftinvariant complex structures, and these immediately have no H^2. $\endgroup$ – Greg Kuperberg Nov 10 '09 at 22:27

1$\begingroup$ A compact complex manifold without $H^2$ is not algebraic. See a sketch of a proof here: sbseminar.wordpress.com/2008/02/14/… $\endgroup$ – David E Speyer Nov 10 '09 at 22:49

1$\begingroup$ The cohomology of a ndimensional smooth toric variety is given by the same recipe whether or not it is projective: one generator x(i), in degree 2, for each ray rho(i) of the fan. The relations are that $x(i\_1) ... x(i\_k) =0$ whenever the rays rho(i_1) ... rho(i_k) do not lie in a common cone, combined with n linear relations that are a little too complicated to write here. (See Fulton's book.) The first set of relations is in degree larger than 2, so H^2 has dimension (number of rays)n, which is always greater than 0. $\endgroup$ – David E Speyer Nov 10 '09 at 22:53

$\begingroup$ I should have said "compact ndimensional smooth toric variety" in the above answer. $\endgroup$ – David E Speyer Nov 10 '09 at 22:56

$\begingroup$ Is it true that (compact if needed) smooth toric varieties are always symplectic? Are all (compact if needed) smooth toric varieties Kaehler? $\endgroup$ – Kevin H. Lin Nov 10 '09 at 23:37
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.

$\begingroup$ Are all algebraic complex manifolds compact Kahler? $\endgroup$ – John McCarthy Nov 10 '09 at 18:40

$\begingroup$ All algebraic complex manifolds are Kahler  the projective plane is Kahler, and a locally closed submanifold of a Kahler manifold is Kahler. An algebraic complex manifold is compact iff it is projective. $\endgroup$ – Pete L. Clark Nov 10 '09 at 19:05

$\begingroup$ Sorry, I meant projective Nspace instead of projective plane. $\endgroup$ – Pete L. Clark Nov 10 '09 at 19:05

$\begingroup$ A submanifold of Kähler manifolds is still a Kähler manifold, so every algebraic manifold is Kähler. Note that not every complex manifold is Kähler (for exmaple the Hopf manifolds are not Kähler) $\endgroup$ – Spinorbundle Nov 10 '09 at 19:07

$\begingroup$ If they are projective, then they are Kähler. But they can also be proper (again, equivalent to compact) without being projective, and I think not all of these are Kähler. $\endgroup$ – Greg Kuperberg Nov 10 '09 at 19:33