Pig can be used in two modes:
1) Map Reduce Mode: You can enter into this mode by typing the command pig in your console. In this way, you will come into the pig grunt shell and execute the commands as per your requirements.
2) Local Mode: You can enter into this mode by typing the command pig -x local. In this way, you will enter the grunt shell.