Choose the right command based on file type:

tar -C /myfolder -zxvf file_name.tar.gz

# Or
tar -C /myfolder -xvf file_name.tar