Firstly, you are inviting trouble if you don't put some restrictions on what types of file people can upload. You will inevitably end up as part of a botnet if you fail to do so.
If you want to avoid over-writing files, you are going to have to think long and hard about what you are doing rather than repeatedly asking the same question.
When the script above runs, it means that a user has uploaded a file and you can find that file at $temp_name = $_FILES["zip_file"]["tmp_name"].
The original name of the file is defined in $zip_file = $_FILES["zip_file"]["name"]. Now ask yourself: What if they uploaded a PHP file instead of a zip file?
At this point, you need to choose where you put this file. If you just use the original filename, you are going to have files over-writing each other. If you choose any other name besides the original, then that will be the new name of the file. If you want to remember what the original filename is, you'll either have to store that original filename somewhere OR you will have to choose a new filename from which you can derive the original filename.
Aside from the name that you choose for the file, you are unzipping it using this code:
$zip = new ZipArchive();
$x = $zip->open($target_path);
if ($x === true) {
$zip->extractTo($dir);
$zip->close();
unlink($target_path);
The name of the directory you unzip is going to be dictated by how you defined your variables. Consider reading the documentation on [man]ZipArchive[/man].
I will also ask you one more time: What happens when two users upload a file with the same name (MyUpload) and then they both come back and request that file? If you have overwritten one file with another, they both get the latter file. If you bother to store the uploads with a different unique filename, how do you determine which file to send to them? You need to think this through.