With the magical thing called programming
But in all honesty I'd recommend learning lua and the basics of programming before starting a game.
Also start off with basic arcade games, not RPGs, 2D shooters, beat 'em ups, etc. Unless you know the principles and understandings of the game functions and how it's supposed to work.