Once you know the graph of a base function $y = f(x)$, you can produce whole families of related graphs by transformations. There are two categories: translations (slides), and stretches and reflections (scalings). The crucial rule to internalize is that changes applied outside the function affect the output ($y$, vertical) intuitively, while changes applied inside the function affect the input ($x$, horizontal) in the opposite way to what you might expect.