From scratch?
(Very hard and tedious)
Learn a programming language with a UI component
Learn pixel-by-pixel rendering
Create your own graphics engine (welcome to pain)
Create your own entity manager
Create your own artificial intelligence (assuming you need one)
Other options:
(Pretty rough if you don't know programming)
Learn a programming language with a free game engine (such as Golden T for Java – I've used this one)
Learn the intricacies of the engine and gradually develop a game using its graphics engine, entity management, etc, etc.
(Sort of rough)
Use a scripted game system such as Games Factory or Multimedia Fusion (the wonderful indie game The Spirit Engine 2 used Fusion, so it must be good :) ). I haven't tried this one.
(Easiest)
Find a simple game creation system for the specific genre you're looking for (such as the RPG Maker series). You can create a game, but unless you put a lot of work into it, it'll probably get lost in a maze of look-alikes. I briefly tried RPG Maker back in the day (think it was RPG Maker 95 then) and it was tolerable enough.