So I don't know why this worked but I fixed it.
Basically I unplugged everything from my PC including keyboard, mouse, headphones, webcam, HDMI cable, PCIe cable for the graphics card and then just turned the PC on. After a while I turned it off by holding the power button on the case. Plugged everything back in and the lines disappeared.
I fixed it but I'm still curious what those lines were. If anyone knows, please tell me.