Answer
(a) One-to-one function is a function such that for every $x_1$ and $x_2$ from its' domain $x_1\neq x_2\Longleftrightarrow f(x_1)\neq f(x_2)$.
(b) For the function to be one to one, it has to pass the so-called, horizontal line test. No horizontal line may intercept the graph of the function more than once.
Work Step by Step
(a) One-to-one function is a function such that for every $x_1$ and $x_2$ from its' domain $x_1\neq x_2\Longleftrightarrow f(x_1)\neq f(x_2)$.
In other words, not only one particular $x$ as to be mapped only to one $y$ (which comes from the definition of the function) but also to one particular $y$, only one $x$ can be mapped which means that there is one-to-one correspondence between the elements of the domain and the elements of the range (hence the name one-to-one).
(b) For the function to be one to one, it has to pass the so-called, horizontal line test. Namely, no horizontal line may intercept the graph of the function more than once. If it were to do so, that would mean that to one value of $y$ correspond multiple values of $x$ which is in contradiction with part (a).