An Action Replay is a cheat device. It sits between the game and the console, letting you enter codes that alter how the game behaves: infinite lives, unlocked characters, level skips and so on.
Datel made the best-known line, with versions for the Nintendo DS, GameCube, Wii and others. On modern platforms the same idea survives as trainer programs on PC and built-in cheat menus in some games. Using them in single player is harmless fun; online, most games treat it as cheating and will ban accounts for it.