'Moshi-moshi' means 'speaking, speaking'.
New students of Japanese will sometimes mis-translate it as 'If-if' because 'Moshi' or 'Moshi-mo' is 'if'. But ’moshi-moshi' comes from 'mousu' meaning 'speak'.
If you pick up the phone, and say 'moshi-moshi' and don't hear anything, (connection is bad) you say it again, and if still there's no one there,
it tends to get elongated 'Moshi-mooooshiiii' like 'your last chance to answer before I hang up'.
The only other time it's used , like Tofugu said, is when somebody is zoned out and they don't hear you address them, like 'Hey!'.