Selenium is used in Test Automation, however its just testing the Web UI and Functionalities. Selenium doesn't have any inbuilt reporting mechanism also, Selenium does not have any control on the execution order OR execution customization.
TestNG is used to empower Selenium for these basic essence of Reporting and Execution Customization. TestNG is used to control the execution flow, data provided in Function , execution priorities, execution control (incase we want to execute a limited set of functionalities.)
TestNG creates an XML file which control the exection and test can be executed with the testng.xml file directly.
All you need to install TestNG into your IDE and import this Library in your project.