In Milnor's book "Topology from the Differentiable Viewpoint", He states the following lemma: Let $M, N$ be oriented $n$ manifolds, with $M$ compact and $N$ connected. Let $f : M \to N$ be a smooth map, and $y$ a regular value of $f$. Also, suppose $f$ can be extended to $F : X \to N$ where X is a compact oriented manifold with boundary M. Then $deg (f ; y) =0$.
I do not understand the proof given. He first proves it in the case when $y$ is a regular value of $F$. In this case, he claims that $F^{-1} (y) $ is a compact $1$ manifold with boundary and hence is the disjoint union of circles and line segments. He then claims that for any line segment, the sum of signs of the two boundary points is $0$ establishing the theorem. He then extends it to the other points by using the fact that it (the degree) is locally constant. I don't understand Milnor's proof of the claim.