Apache Pig can be executed in two different modes: 1. Local Mode - All the files will be installed and run from your local file system and local host in this mode. Usually, this mode is utilized for the purpose of testing. Here, you won't need HDFS or Hadoop. 2. MapReduce Mode - In the MapReduce mode, Apache Pig is used for loading and processing the data that is already existing in the Hadoop File System (HDFS). A MapReduce job will be invoked in the back-end whenever we try to execute a Pig Latin statement for processing the data. It will perform a particular operation on the already existing data in the HDFS.