That is an internal arrangement depending on the organisation structure and the line of command.
There is no clear or streight jacketed rules.
Mostly, HR department and the Compliance Officer (if any) will see to it that the labour laws are being followed.
Further, in case of any inquiry, the same will be handled by concerned HR team, or if the matter is serious or has critical implications, Legal and HR team jointly.
If the matter goes to the court, then ofcourse, it will be handled mainly by Legal with inputs and assistance of HR where required.
But like i said, it depends on how your organsation is structured.