TITLE: Algebraic versus topological line bundles
QUESTION [20 upvotes]: Let $X$ be a CW complex. The (isomorphism classes of) complex line bundles on $X$ are classified by the homotopy classes of maps $X \to \mathbb{CP}^\infty$, that is by the elements of $H^2(X, \mathbb{Z})$. 
It is also true that the tensor product of line bundles corresponds to adding cohomology classes. It follows that if $n \in \mathbb{N}$, then the line bundles of $\mathbb{CP}^n$ are generated by the tensor powers of the tautological line bundle, or, equivalently, by the tensor powers of the sheaf typically denoted  $\mathcal{O}(1)$ in algebraic geometry (because the dual of $\mathcal{O}(1)$ is the tautological bundle).
It is also true that the isomorphism classes of algebraic line bundles on $\mathbb{CP}^n$ forms  a group isomorphic to $\mathbb{Z}$, given by the powers of $\mathcal{O}(1)$, as one can see by studying the Weil class group. It follows that the isomorphism classes of line bundles are the same in both the algebraic and the topological category.
The above observation is also true for affine $n$-space, because the topological line bundles are trivial ($\mathbb{C}^n$ being contractible), and the algebraic ones are as well (the polynomial ring being a UFD).
To what extent is this true in general?

REPLY [4 votes]: Deat Akhil, I have nothing to add to Matt E's masterful survey on the algebraic/analytic comparison. However since you ask about topological line bundles, you have to modify his answer in the following way. 
You must replace everywhere $\mathcal O$ by $\mathcal C$, the sheaf of continuous functions. Now things are very easy: since $\mathcal C$ is soft (fine if you prefer), it is acyclic and so the map 
$Pic^{top}(X) \to H^2(X,
 \mathbb Z)$ is an isomorphism: a topological line bundle is classified by its Chern class, which lives in the second cohomology group of the space. To put it dramatically: the continuous jacobian is trivial ! 
For example topological line bundles on a compact Riemann surface are classified by  $\mathbb Z$ in stark contrast to the huge Picard variety classifying its algebraic= analytic line bundles. So to answer your question "To what extent is this true in general?" [natural bijection between  algebraic and topological line bundles] I would answer, just for the pleasure of using the anglicism : "once in a blue moon".