In Japanese, moshi-moshi corresponds to "excuse me" in English. It is used to get people's attention, in exactly the same way hello is used in English. The Japanese use it to answer the phone. This contrasts with the Spanish bueno or the French/German hallo, which are greetings.

Moshi-moshi, along with sumimasen, is a popular phrase for getting the attention of a stranger, because it contains elements of apology.

(picking up phone) Moshi-moshi, Jiibasu desu.
Hello, this is Jeeves.

Moshi-moshi, hankachi ga ochimashita yo.
Excuse me, you've dropped your handkerchief.

Starrynight pretty much has it right above, but moshi-moshi is a good phrase to have in your inventory for addressing strangers and for politely declaring that the building is on fire.