HIV and diarrhea: Causes, treatment, and remedies

What is the connection between diarrhea and HIV, when might it occur, and how long does it last? Are there any complications with HIV and diarrhea?