Depends where you are in the terminal.
For example if the compressed file is example.tar.gz, placed in ~/Documents and you open a terminal there, it will be extracted there.
~/Documents$ tar -zxvpf example.tar.gz
example1.txt
example2.txt
But if you are in home directory, then
~$ tar -zxvpf...