A bit of further explanation:
The parent function is y = 1/x which is a hyperbola that has a vertical asymptote overlapping the y axis perfectly. Its vertical asymptote is x = 0 as we cannot divide by zero. If x = 0 then 1/0 is undefined.
Shifting the function h units to the right (h is some positive number), then we end up with 1/(x-h) and we see that x = h leads to the denominator being zero. So the vertical asymptote is x = h
For example, if we shifted the parent function 2 units to the right then we have 1/x turn into 1/(x-2). The vertical asymptote goes from x = 0 to x = 2. This shows how the vertical asymptote is very closely related to the horizontal shifting.