To get a ratings change you have to play a rated game.
About Rating in chess games

I played an opponent that was higher than me in rating, the game was later left with a king and a pawn and my king was opposing my opponent's king, he, knowing that I'd win d game,resigned but my rating didn't increase. why ?

Before the game begins there is an option to make it unrated. Your rating didn't change in the linked game because it was one of these unrated games.
http://www.chess.com/echess/game?id=119349162
Please, I need to know how rating in chess is done, when does one's rating increases or remain unchanged even after a win by his/her opponent resignation?