varies depending on type fixture and what is supplied by the manufacturer. You need to check NEC 410.62 for particulars.
You will see 90% of the time its cord and plug.
We've found it varies from state to state as well. N.H. will not allow any cord unless it is supplied with the fixture.
While ME, VT, MA, NY have allowed a hardwired installation.