Help with sprites

I am wanting to make a platform rpg with the main character a sprite form a sheet and i was wondering how i could make it walk properly ect cause i cant find any good tuts on em. Like when i hit right it changes sprite so it looks like its walking