So I paid a bounty collector hoping that after that I can go to the city of Markarth without the guards attacking me. But they still do. Or they try to take me to jail. And if I kill someone in there my bounty increases as if it's the first time I'm doing something wrong in there. Is it a glitch? Is there any way to fix this?
If you fast-travelled to Markath right after paying him, odds are, you still have that bount on your head. And committing more crimes means you still have one right now.
Otherwise, it could also be a bug.