Well screens are supposed to rotate, if you turn the tablet. No matter if there is an app or not open.
Try restarting the tablet (turn it off and back on). That will usually be all you need to resolve the issue.
Should it not stop, then you may want to try starting up the tablet in "Safe Mode" and see if it happens in there. If it doesn't, then there is something (bad app, virus, malware, etc.) that you need to remove from the table to get it to stop. If it doesn't stop in "Safe Mode" then there may well be an issue with the OS and a "Hard Reset" would be needed, or it is a hardware issue.
To get into "Safe Mode" please do the following.
1. First turn off the tablet.
2. Next press and hold "Power" until you see the manufacturers...