Appium is a test automation tool that allows testing of mobile web, native, and hybrid applications across various platforms. It supports automation of apps on Android and iOS. Appium uses JSON wire protocol to communicate between the Appium server and client libraries. For Android, it uses UIAutomator framework to interact with apps, while for iOS it uses XCUITest framework. Setting up Appium requires installing Java, Android Studio or Xcode, appium server and client libraries. The appium server acts as a middle-ware between the test scripts and mobile platforms by routing commands to appropriate framework-specific modules.