Let $X$ be a complex analytic space. There is an exact sequence, the exponential exact sequence, which is of fundamental importance for analyzing this (and related) questions:
$$ 0 \to 2 \pi i \mathbb Z \to \mathcal O_X \buildrel \exp \over \longrightarrow \mathcal O^{\times}_X \to 1 .$$
Assume now that $X$ is proper and connected. When we pass to cohomology, the sequence of $H^0$s is then short exact, but we obtain the following crucial long exact sequence:
$$H^1(X, 2 \pi i \mathbb Z) \to H^1(X,\mathcal O_X) \to Pic(X) \to
H^2(X,2 \pi i \mathbb Z) \to H^2(X,\mathcal O_X).$$
Here I am writing (as is usual) $Pic(X)$ to denote $H^1(X,\mathcal O_X^{\times})$, the group of isomorphism classes of analytic line bundles on $X$. If $X$ is algebraic, then by GAGA this is the same as the group of algebraic line bundles on $X$.
The boundary map $Pic(X) \to H^2(X,2 \pi i \mathbb Z)$ is the Chern class map
(with a $2\pi i$ twist, or Tate twist; this is natural in the algebraic context, and to get the topological Chern class you just divide through by
$2 \pi i$).
So that we see that the kernel of the Chern class map can be identified with
$H^1(X,\mathcal O_X)/H^1(X,2 \pi i\mathbb Z)$, and vanishes when $H^1(X,\mathcal O_X) = 0$.
The image of $Pic(X)$ under the Chern class map is called the Neron--Severi group; its kernel is denoted $Pic^0(X)$ or $Pic^{\tau}(X)$. When $X$ is algebraic, $Pic(X)$ is naturally an algebraic group, $Pic^0(X)$ is the connected component of the identity, and $H^1(X,\mathcal O_X)$ is the tangent space to the identity.
If $X$ is a smooth projective curve, then $Pic^0(X)$ is usually called the Jacobian of $X$. You can look at the section of Hartshorne in Chapter IV to get some sense of it, although you may not realize from reading that how fundamental the role of the Jacobian is in the theory of algebraic curves. If you google Torrelli theorem, Abel--Jacobi theorem, and theta divisor (just to give some sample search terms) you will get some sense of it. Griffiths and Harris also has a detailed discussion, which gives a better sense of its significance.
If $X$ is algebraic but not proper, then you can compacitify it by adding a divisor at infinity. Let me write $\overline{X}$ for the compacification, and let me assume that $\overline{X}$ is in fact smooth, so then the divisor $D := \overline{X}\setminus X$ is a Cartier divisor, and gives rise to an associated line bundle $\mathcal O(D) \in Pic(\overline{X}).$ (This is denoted
$\mathcal L(D)$ in Hartshorne, I think, and in some other texts, especially older ones, but $\mathcal O(D)$ is more common notation these days, and is better notation too.) If $D$ is reducible (as can happen; in general it can be taken to be a normal crossings divisor, but no better --- e.g. to compactify a curve to a smooth projective curve, we have to add in a finite number of points, but one point will not be enough, typically), write it as
$D_1 \cup \cdots \cup D_n$.
Then we also have associated line bundles $\mathcal O(D_i)$ for each $i$, whose product is $\mathcal O(D)$, and note that each of these is trivial when restricted to $X$ (because $X = \overline{X} \setminus D$). One now sees
that $Pic(X) = Pic(\overline{X})/\langle \mathcal O(D_1),\ldots,\mathcal O(D_n)
\rangle,$ and so if $Pic^0(\overline{X})$ is non-trivial, then $Pic(X)$ will also have a non-discrete part (because we can't kill a connected algebraic group by quotienting out a finitely generated subgroup).
So the answer to your question is, at least for smooth $X$, is: compactify $X$ to $\overline{X}$, and then compute $H^1(\overline{X}, \mathcal O)$; if this is non-trivial, then the Chern class map has a (huge!) kernel.
[Added later: As an example, if $X$ is a hypersurface in $\mathbb P^n$ for $n > 2$ (so $X$ has dimension $> 1$), then $H^1(X,\mathcal O_X) = 0$ (exercise!), and so hypersurfaces give interesting examples.
For a surfaces, the dimension $H^1(X,\mathcal O_X)$ was classically (i.e. by the Italians) known as the irregularity of the surface $X$. (The reason being that they knew formulas, like Riemann--Roch, for surfaces in space, which when they tried to extend to more general surfaces became false unless the extra quantity $\dim H^1(X,\mathcal O_X)$ was introduced --- although of course they didn't describe it this way.) See my comment here, as well as the notes of Kleiman linked to by Jason Starr, which will tell you a lot about Picard varieties and much more.]
Best Answer
You need to be careful what kind of $\mathrm{Pic}$ you are talking about!
The point is that if $X/\mathbb{R}$ is a finite type $\mathbb{C}$-scheme then $X(\mathbb{R})$ (resp. $X(\mathbb{C})$) is a real (resp. complex) manifold (the former being only 'locally a manifold' depending on what sort of axioms of a point-set topological nature you impose). This then allows you to define maps
$$\mathrm{Pic}_\mathrm{alg}(X)\to \mathrm{Pic}_\mathrm{smooth}(X(\mathbb{R}))\to\mathrm{Pic}_{\mathrm{cont.}}(X(\mathbb{R}))\qquad (1)$$
and maps
$$\mathrm{Pic}_\mathrm{alg}(X_\mathbb{C})\to \mathrm{Pic}_{\mathrm{hol.}}(X(\mathbb{C}))\to\mathrm{Pic}_{\mathrm{cont.}}(X(\mathbb{C}))\qquad (2)$$
But, in general, these maps needn't all be isomorphisms!
For example if $M$ is a smooth real manifold then there is actually an isomorphism
$$\mathrm{Pic}_\mathrm{smooth}(M)\xrightarrow{\approx}\mathrm{Pic}_{\mathrm{cont.}}(M)\cong H^1_\mathrm{sing}(M,\mathbb{Z}/2\mathbb{Z})$$
The latter isomorphism comes from the fact that the classifying space of continuous real line bundles is $\mathbb{RP}^\infty$ which is a $K(\mathbb{Z}/2\mathbb{Z},1)$. The former isomorphism can be thought about in two ways:
From this we see that we can refine $(1)$ to
$$\mathrm{Pic}_\mathrm{alg}(X)\to \mathrm{Pic}_\mathrm{smooth}(X(\mathbb{R}))\xrightarrow{\approx}\mathrm{Pic}_{\mathrm{cont.}}(X(\mathbb{R}))$$
but this former map needn't be an isomorphism. As you pointed out, if $X=\mathbb{P}^1_\mathbb{R}$ then this fomer map is
$$\mathrm{Pic}_\mathrm{alg.}(\mathbb{P}^1_\mathbb{R})\cong \mathbb{Z}\to\mathbb{Z}/2\mathbb{Z}= \mathrm{Pic}_{\mathrm{smooth}}(\mathbb{RP}^1)$$
where explicitly the map takes $\mathcal{O}(n)$ to the trivial bundle if $n$ is even and the Mobius bundle if $n$ is odd! The point being that while the algebraic structures on $\mathcal{O}$ and $\mathcal{O}(2n)$ (as well as $\mathcal{O}(1)$ and $\mathcal{O}(2n+1)$) are not algebraically equivalent, they are smoothly equivalently. Try it for yourself with overlap maps $x$ and $x^3$!
In the $\mathbb{C}$-case if you assume that $X$ is, in addition, proper then you actually get an isomorphism
$$\mathrm{Pic}_{\mathrm{alg.}}(X)\xrightarrow{\approx}\mathrm{Pic}_{\mathrm{hol.}}(X(\mathbb{C}))$$
this follows from Serre's GAGA results. Moreover, we can describe the map $\mathrm{Pic}_{\mathrm{hol.}}(X(\mathbb{C}))\to \mathrm{Pic}_{\mathrm{cont.}}(X(\mathbb{C}))$ quite nicely. Namely, the complex continuous line bundles on $X(\mathbb{C})$ can be described as $H^2_\mathrm{sing}(X,\mathbb{C})$. Again, the reason for this is that the classifying space of complex line bundles is $\mathbb{CP}^\infty$ which is a $K(\mathbb{Z},2)$. The holomorphic line bundles on $X(\mathbb{C})$ are classified by $H^1(X(\mathbb{C}),\mathcal{O}_{X(\mathbb{C})}^\times)$. The connection between the two is given by the exponential sequence
$$0\to \underline{\mathbb{Z}}\to \mathcal{O}_{X(\mathbb{C})}\to\mathcal{O}_{X(\mathbb{C})}^\times\to 0$$
where the second map is $f\mapsto \exp(2\pi i f)$. Taking the long exact sequence in cohomology we get (part of the ) long exact exponential sequence
$$H^1_\mathrm{sing}(X,\mathbb{Z})\to H^1(X(\mathbb{C}),\mathcal{O}_{X(\mathbb{C})})\to H^1(X(\mathbb{C}),\mathcal{O}_X^\times)\to H^2_\mathrm{sing}(X(\mathbb{C}),\mathbb{Z})\to H^2(X(\mathbb{C}),\mathcal{O}_{X(\mathbb{C})})$$
And, in fact, the natural diagram
$$\begin{matrix}\mathrm{Pic}_{\mathrm{hol.}}(X(\mathbb{C})) & \to & \mathrm{Pic}_{\mathrm{cont.}}(X(\mathbb{C})\\ \downarrow & & \downarrow\\ H^1(X(\mathbb{C}),\mathcal{O}_{X(\mathbb{C})}^\times) & \to & H^2_\mathrm{sing}(X(\mathbb{C}),\mathbb{Z})\end{matrix}$$
commutes with the vertical maps being isomorphisms. This map is called the Chern class of an algebraic/holomorphic line bundle.
So, if $X$ is a smooth projective (geometrically) connected curve of genus $g$ we see that the map
$$\mathrm{Pic}_{\mathrm{alg.}}(X(\mathbb{C}))\to \mathrm{Pic}_{\mathrm{cont.}}(X(\mathbb{C}))$$
is surjective with kernel a quotient of a vector space of dimension $g$. So, if $X=\mathbb{P}^1_\mathbb{R}$ the kernel is trivial and we get the desired isomorphism
$$\mathrm{Pic}_{\mathrm{alg.}}(\mathbb{P}^1_\mathbb{C})\cong \mathrm{Pic}_{\mathrm{cont.}}(X(\mathbb{C}))\cong H^2(\mathbb{CP}^1,\mathbb{Z})\cong \mathbb{Z}$$
In fact, what's generally true is that if $X/\mathbb{R}$ is a smooth projective (geometrically) connected curve then the (portion of )the long exact exponental sequence can be written
$$\begin{matrix}H^1_\mathrm{sing}(X(\mathbb{C}),\mathbb{Z}) & \to & H^1(X(\mathbb{C}),\mathcal{O}_{X(\mathbb{C})}) & \to & \mathrm{Pic}(X_\mathbb{C}) & \to & H^2(X(\mathbb{C}),\mathbb{Z}) & \to & H^2(X(\mathbb{C}),\mathcal{O}_{X(\mathbb{C})})\\ \downarrow & & \downarrow & & & &\downarrow & & \downarrow\\ \mathbb{Z}^{2g} & &\mathbb{C}^g & & & & \mathbb{Z} & & 0\end{matrix}$$
And, if you take it on faith (this is the beginning of Hodge theory!) that $\mathbb{Z}^{2g}$ is embedded into $\mathbb{C}^g$ as a lattice, then we see that we get a short exact sequence
$$0\to \mathbb{C}^g/\mathbb{Z}^{2g}\to \mathrm{Pic}(X_\mathbb{C})\to \mathbb{Z}\to 0$$
so that $\mathrm{Pic}(X_\mathbb{C})$ looks like a disconnected complex Lie group with component group $\mathbb{Z}$ and identity component an abelian variety (i.e. a compact complex Lie group). This identity component is called the Jacobian of $X_\mathbb{C}$ and is denoted $\mathrm{Jac}(X_\mathbb{C})$. The map from $$\mathrm{Pic}(X_\mathbb{C})\to \mathbb{Z}=\pi_0(\mathrm{Pic}(X_\mathbb{C}))$$ is just the degree map. Of course, since $\mathbb{Z}$ is projective and discrete this sequence non-canonically splits to give you that $\mathrm{Pic}(X_\mathbb{C})\cong \mathrm{Jac}(X_\mathbb{C})\times\mathbb{Z}$.
For example, if you take $X=E$ an elliptic curve, then it turns out that $\mathrm{Jac}(E_\mathbb{C})\cong E_\mathbb{C}$!
All of this then starts the fascinating journey into the Albanese variety/Picard scheme of a smooth proper scheme!
The last thing I'll say that is that, in some sense, the algebraic bundles on $X/\mathbb{R}$ smooth projective are much more closely related to the holomorphic bundles on $X(\mathbb{C})$ than the continuous bundles on $X(\mathbb{R})$! In fact, there's the so-called 'Picard-Brauer sequence' which contains the terms
$$0\to \mathrm{Pic}(X)\to \mathrm{Pic}(X_\mathbb{C})^{\mathrm{Gal}(\mathbb{C}/\mathbb{R})}\to \mathrm{Br}(\mathbb{R})(\cong\mathbb{Z}/2\mathbb{Z})$$
From this we see that the algebraic bundles on $X$ embed into the algebraic bundles on $X_\mathbb{C}$ (which is equal to the holomorphic bundles on $X(\mathbb{C})$) and that up to a $\mathbb{Z}/2\mathbb{Z}$-term they exactly hit the Galois invariants of the algebraic bundles on $X_\mathbb{C}$.
In the case of $X=\mathbb{P}^1_\mathbb{R}$ this sequence is not very interesting. It looks like
$$0\to \mathbb{Z}\to\mathbb{Z}\to \mathbb{Z}/2\mathbb{Z}$$
where the map $\mathbb{Z}\to\mathbb{Z}$ is an isomorphism and the map $\mathbb{Z}\to\mathbb{Z}/2\mathbb{Z}$ is trivial.
But, if instead of $\mathbb{P}^1_\mathbb{R}$ you took it's only non-trivial twist $X:=V(x^2+y^2+z^2)\subseteq\mathbb{P}^2_\mathbb{R}$ then your sequence actually looks like
$$0\to 2\mathbb{Z}\to \mathbb{Z}\to \mathbb{Z}/2\mathbb{Z}\to 0$$
The point being that if you take any degree $2$-point on $X$ then $\mathrm{Pic}(X)\cong \{\mathcal{O}(np):n\in\mathbb{Z}\}$. But, since $p$ is a point of degree $2$ when you base change to $\mathbb{C}$ you get that $p$ splits into two points--$q_0$ and its Galois conjugate $\sigma(q_0)$ so that $\mathcal{O}(p)$ maps to $\mathcal{O}(q_0)\otimes \mathcal{O}(\sigma(q_0))\cong \mathcal{O}(2)$.