If you are just starting out with g-code you should learn the very basics first. It will help you a lot.
You can write/edit g-code with something as simple as (windows) Notepad, I use it often, but my favorite program for edits is
www.ncplot.com , because you can write/edit g-code while it plots, plus you can get the free beta version.
At the same time you can learn a lot by looking at sample g-code files posted all over this site.
G-code is nothing more than a simple text file.
Start with small steps.
.