I have heard that the Seifert–van Kampen theorem allows us to view HNN extensions as fundamental groups of suitably constructed spaces. I can understand the analogous statement for amalgamated free products, but have some difficulties understanding the case of HNN extensions. I would like to see how HNN extensions arise in some easy topological setting.
Let $X$ be my space, $Y \subseteq X$ and $f$ some selfhomeomorphism of $Y$. Then I consider $C=Y \times I$ and identify $C \times \{0\}$ with Y and $C\times \{1\}$ with $f(Y)$. I think that the fundamental group of the resulting space should have a presentation of the form $$ \langle \pi_1(X),t | t g t^{-1} = f_*(g) \ \ \forall g\in \pi_1(Y)\rangle$$ (I omitted the relators which already appear in $\pi_1(X)$). This should follow from Seifert-van Kampen, but I can't see which are the open sets $U,V$ to which we are applying it (in the notations of the Wikipedia article). Probably the generator $t$ arises as the curve we obtain as we follow some basepoint $y\in Y$ going through $C$ and back, so maybe $U$ should be some sort of "tubular neighborhood$ of this curve; but I'm not sure how to formalize this (or even if this is true).
The best reference for this (at least to me) is these lecture notes. Just go through the first 5 pages. There are many pictures also.