Here’s a tutorial from Maxim describing the basics of USB on the go (OTG). OTG gives, devices that support it, the capability to act as hosts to other devices. But OTG concept doesn’t end just there, it also allows for on the fly role reversal, and gives the peripheral the ability to request power from the host only when it’s needed.
USB On-the-Go (OTG) allows two USB devices to talk to each other without requiring the services of a personal computer. Although OTG appears to add “peer to peer” connections to USB, it does not. Instead, USB OTG retains the standard USB host/peripheral model, where a single host talks to USB peripherals. OTG introduces the dual-role device (DRD), capable of functioning as either host or peripheral. Part of the magic of OTG is that a host and peripheral can exchange roles if necessary.