Since your question is general, not specific to this case - it depends on the Contract Law in whatever jurisdiction the employee works.
In most countries, the replacement will now be an employee. If the country provides protection to employees against termination, (s)he has it. The employer may have to suck up the additional costs of employing an extra employee. This is why dismissals should be undertaken with great care.
In reality, many countries allow a probationary period for new employees. If the employer isn't happy with the new employee by the end of the period (or even earlier), the employee can be et go with minimal fuss. So the replacement may be let go for any reason.