As described, your iPad likely has a screen hardware fault. If recently purchased, you would be best advised to return the iPad to the retailer from which it was purchased for exchange or refund/
For the benefit of others that may encounter this thread when searching for remedies to similar issues...
You can easily determine if your iPad has a hardware or software issue. A reliable method to confirm a screen or other hardware fault is to take a screenshot when the fault is evident - and then review the captured screenshot image...
When reviewed, if the line(s) are not present in the screenshot image, then you have demonstrated that you may have a hardware fault - that will require repair. If the line(s) are visible in the screenshot, the something other than hardware will be the cause.
Note: When reviewing the image, rotating the iPad screen orientation by 90°, from Portrait to Landscape, will ensure that the image does not coincide with screen defects if present.
Take a screenshot on your iPad – Apple Support
If the test indicates that a potential hardware fault, a visit to the Genius Bar at your local Apple Store is recommended - where the technicians will be able to test and assess your iPad. This will likely inform your next steps:
Genius Bar Reservation and Apple Support Options - Apple
iPad Repair – Official Apple Support