Sometimes, the computer says that I left the game, but its not true, so I lose the game, even when I was winning. Is this just due to internet connection or is there something like cheating on chess.com?
Your opponents can't impact your connection. There are a lot of different things that can cause a disconnect between you and the live server.
For things under your control check out the following.
https://support.chess.com/en/articles/8652402-how-can-i-optimize-my-online-chess-performance
https://support.chess.com/en/articles/8584209-how-do-i-fix-my-disconnect-lag-issues
Sometimes, the computer says that I left the game, but its not true, so I lose the game, even when I was winning. Is this just due to internet connection or is there something like cheating on chess.com?