Recall the theorem (first part) : It says that if X is a k-variety, then is a free module of finite rank.
The first step is to be able to say “WLOG, we can assume X is a normal affine k-variety” .
For that, we should know what normalization is. Here’s a very well written post explaining what normalization actually is, with some worked out examples. And in case,the link becomes redundant at some point, a pdf copy of the same post is here : normalization
Now if Y is any open affine subset of our given X, we construct the normalization of Y, and call it . This is also affine, as the link above explains and . And since is a sheaf, we have . In fact this is also injective because X is integral ?
So we have an injective map , which induces an injection . Hence if we show the theorem holds for affine normal varieties (like Y’), then because any subgroup of a free finite rank module is also free abelian and of finite rank, we are done !