It works like this. Let's say that two people have the Instagram app on their phones. Each person has multiple Instagram accounts on their app. Person 1 has accounts A and B. Person 2 has accounts B and C. B is a shared account. What is happening is that personal notifications and Direct Messages meant for only A are being viewed by Person 2, and notifications and Direct Messages meant for C are available to be read by Person 1. The wrong person is getting the opportunity to see who is viewing another account holder's pictures, and what people are saying about them.
Tapping on the wayward notifications or Direct Messages not meant for you will lead to your own Instagram account, or to the post in question if someone else mentioned it on a public account. Keep in mind that this is not happening to everyone with a shared second account, and for some the bug stopped after one day.
Instagram is aware of the issue and is working on a fix.