The literal translation of the verse https://quran.com/2/7 is
Allah has sealed their hearts, locking inside them their falsehood, and has placed a seal on their hearing, so that they do not listen to nor accept the truth. He has put a cover over their eyes so that they do not see the truth in its clarity. They will suffer greatly.
To whom does this verse refer? A non-Muslim disbeliever or a Muslim disbeliever?
If this verse refers to a non-Muslim disbeliever then doesn't this feel unjust? Why will Allah SWT punish someone for not believing and following Islam if He himself made them so? It's like they were stopped from not understanding and following Islam by Allah SWT himself and then in the afterlife, they are being punished for not following Islam.
If this verse refers to a Muslim disbeliever, then this should mean that any Muslim disbeliever shouldn't be able to revert back to Islam as Allah would have sealed his/her heart but there are instances where people have reverted back.
Please help me understand this verse.