In testNG.xml file,
<suite name="Test-method Suite" parallel="methods" thread-count="2" >
We have attribute called paralle, which allows you to execute tests in parallel, it has options such as "methos", "classes" and "tests".
"Methos" - this will execute each @Test method in parallel
"Classes" - This will execute each class in parallel, Test methods inside class in sequential.
"Tests" - This will execute each <test> node in parallel.
"thread-count" attribute can help you control how many tests to be execute in parallel.