What is the legal process for terminating or releasing a employee on grounds of poor performance and also if the employee is not yet confirmed in the company?

Under such circumstances this is what you can do :

Prepare a warning letter stating that he need to improve his level of performance and a time of 2 months is given . HR and TL should let the employee know on what grounds he has to enhance his level of performance. Employee should sign the letter and the same should be filed in their respective file. The employee should be aware that in case if he fails to reach the expectation of TL, termination letter will be issued.

After 2 months down the line, HR should conduct an review and if still the TL is not satisfied with the employee performance a second warning letter will be issued and a span of 1 month will be given to the employee to prove himself.

At the end of 1 month if nothing seems to change then an termination letter can be issued stating that despite of two levels of warning we have not seen any change in your level of performance so management has come to an decision to issue the termination.