The price elasticity of demand is defined as:
$$E_P=\frac{dQ}{dP} \frac{P}{Q}$$
Although generally elasticity depends on price there is a special type of functions (isoelastic functions) for which elasticity remains the same along the whole function.
For example consider demand given by:
$$P=AQ^{1/e}$$
This demand function will always have the same price elasticity $E_P=e$ which you can verify by first solving the function above for Q and then applying the formula mentioned above. For $|e|=1$ the elasticity would always be unity. This is because the elasticity does not depend on anything else for example for a linear demand function the elasticity would depend on price as for $Q=a-P$ the $E_P=-P/(a-P)$ and hence as you correctly pointed out along line the elasticity constantly changes with price.
When you plot the function above you will get a picture that looks like hyperbola. See the picture below. However, not all functions that describe hyperbola have such property I don’t think your teacher meant to say all hyperbolas have constant elasticity.
.
Also the demonstration project from wolfram alpha where I got the picture has amazing utility that graphically shows how the elasticity remains same along every point of the curve. The utility even allows you to play with the parameters of the model. Here is the link for it if you want to explore it.
——————————————————-
Per request in the comment this is how you show that the elasticity is $e$ for $P=AQ^{1/e}$
- Solve for $Q$ which gives you:
$$Q= \frac{1}{A} P^e$$
- Apply the formula for elasticity which gives you:
$$E_p=e\frac{1}{A}P^{e-1} \frac{P}{Q}$$
- Substitute for Q the original expression $Q= \frac{1}{A} P^e$
$$E_p=e\frac{1}{A}P^{e-1} \frac{P}{ \frac{1}{A} P^e}$$
- Simplify the above expression and you will get:
$$E_P=e$$