…our sheaf of continuous functions on the reals consists in specifying, for each open subset $U ⊆ R$, the set $C(U,R)$ of real continuous functions on $U$. Clearly, when $V ⊆ U$ is a smaller open subset, every $f ∈ C(U,R)$ restricts as some $f|V ∈ C(V,R)$. Writing $O(R)$ for the lattice of open subsets of the reals, we get so a contravariant functor $C(−,R): O(R) \rightarrow Set$.
https://tcsc.lakecomoschool.org/files/2018/06/Como2018.pdf
Assuming $O(R)$ is a category where there is an arrow $f: A \rightarrow B$ if $A \subseteq B$, why does this imply a contravariant functor to $Set$?
In $Set$, the arrows are functions between sets.
Does this functor map an arrow in $O(R)$ to a function $g: B \rightarrow A$?
Or the reverse, $f: A \rightarrow B$ if $B \subseteq A$, and $g: B \rightarrow A$ is the inclusion map of $B$ into $A$?
If $U\subseteq V$ and $f:V\to\mathbb{R}$ then the construction turns it into $f_{|U}:U\to\mathbb{R}$. And therefore an arrow $U\to V$ is transformed into the arrow $$C(V,\mathbb{R})\to C(U,\mathbb{R})$$ $$f\mapsto f_{|U}$$ so contravariant.