That depends on the type of fixture you are installing. Direct wire fixtures may be necessary to contact a licensed electrician to consult you on installing a direct wire fixture. The upside to this type of light fixture is that once installed correctly, your lights will turn on and off using your in-wall light switch. Direct wire fixtures are also a more permanent installation, which makes them a preferred option for many homeowners, while renters may still prefer a plug-in alternative.
Plug-in fixtures come with a standard power cord that plugs into any power outlets.
If you lack the know-how to direct wire, and there are no plugs nearby in your space, you also have the option of a battery-operated light fixture. These are great for pantries or closets that lack a good lighting source.