Its not 100% clear what you're asking. You asking why @webserver.com has been added to the from address?
Depending on the server configuration, the from field may require a valid web address. If you're just passing the name but leave out the @webserver.com part, the server may take it upon itself to add it anyways.
And instead of doing:
mail("test@test.com", "[Contact Form]", "$msg", "$sender");
You can just write it minus some of the quotes:
mail("test@test.com", "[Contact Form]", $msg, $sender);