You use the vertical line test to check if something is a function. Then, if it is a function, you use the horizontal line test to see if it has an inverse. If it does not pass the horizontal line test, then it isn't an invertible function
The reason if because the (fake) inverse function that you would get would spit out 2 values for (almost) every x value when talking about parabolas, as shown by the in the problem above, and when that happens it cant be a function