moving objects when in game

I think there is a script to move an object when playing a game. i could not find it Just for 2d movements. Thanks


what do you mean by move an object? just simple like press a key and it moves? or something more advanced?