Tilde (~) File in Macintosh Directory
A ~ file is simply a broken attempt to access and write to your home directory.

This file should be safe to delete as it's not actually your home directory, but make sure you've got a backup in case you or another app needs it for any other purpose.

Also, for what it's worth, ~ is not an alias to your home directory, it's just a shell expansion to the path to the currently logged in user's home directory. It provides no actual path for the file system to follow to the directory.