One way to create a function with a hole is multiplying and dividing it by x, like this:
$f(x) = 1$
$g(x) = \frac{x}{x}$
This creates a so-called "removable singularity" at $x=0$. At school I was taught not to remove such singularities, so I wonder if holes are ever real, or are they just a mathematical artefact that has nothing to do with reality?
Other types of singularities make perfect sense (for example in the trigonometric function $tan$), but they don't create holes. I'm not familiar with any situation where a hole in the function makes sense.