How is $0\cdot\infty= -1$? It is known that the product of slopes of two perpendicular lines is equal to $-1$ ($m_1*m_2=-1$ for $m_1$ and $m_2$ being the slopes of the perpendicular lines $l_1$ and $l_2$). The slope of $x$-axis $=0$; the slope of $y$-axis$=$ undefined (or $\infty$); $x$-axis and $y$-axis are perpendicular to each other. So, it must mean that the product of their slopes (i.e. $0$ and $\infty$) must be equal to $-1$. How is $0*\infty=-1$? Is it really?

You can think as a limit. $\lim_{m_1\to \infty} m_2=0$ for $m_1\cdot m_2=-1$. But it's not proper to say $0\cdot \infty=-1$ because you get
$$0\cdot \infty=-1$$
$$a\cdot(0\cdot \infty)=a\cdot(-1)$$
$$(a\cdot0)\cdot \infty=a\cdot(-1)$$
$$-1=0\cdot \infty=-a$$
for any $a\in \mathbb{R}$.
