You say this when you want someone to wait for you for a second or two. Between close friends, you can just say "CHOTTO MATTE." In either of these cases, "CHOTTO"="a moment" can be left out.
"Chotto matte kudasai." = Please wait a second.
"Hai." = OK.