What conditions can we implement for a function to determine it to be one-one using differentiation? My teacher told me that for a function to be one-one it's derivative needs to be greater than or equal to zero or less than or equal to zero. While it's true for the greater than or less than part I have some confusion regarding the equal to zero condition.

It's true for the function $x^3$, but it can never be true for $x^2$ or $x^4$.  If anyone can help me out it'd be greatly appreciated.
The function is on one if for every different x in domain  you get different y from codomain.  Even in $x^2$ or $ x^4$ the points at x=0 .
Let's consider y= $x^2$ for all $x\le 0$ function is decreasing and one one including point x=0. Also for $x\ge 0 $ function is increasing including point x=0. But for all $x\in R $ the function is many one.
The function is on one if for every different x in domain  you get different y from codomain.  Even in $x^2$ or $ x^4$ the points at x=0 .
Let's consider y= $x^2$ for all $x\le 0$ function is decreasing and one one including point x=0. Also for $x\ge 0 $ function is increasing including point x=0. But for all $x\in R $ the function is many one.