The company should give you the form P46, not vice versa. You then complete it, and sign section C which states that you have another job. It is then up to the company to send the form to HMRC, who will instruct them what code to use. Your main employer will not be notified.
In the meantime, the 2nd employer will deduct basic rate tax from the payment, and it would be up to you to declare this to HMRC, and pay any higher rate tax due. It is unlikely you would be due any tax back unless you are not using your full personal allowance at your main job.
Alternatively, if the 2nd employer intends to pay you without deducting tax,ie if you had worked for them free-lance and not as an employee, it will be your responsibility to tell HMRC and account for the tax due.