1. Install devkitPro
2. Copy one of the examples (hello world)
3. Modify the example compile, test, repeat.
4. After getting a little familiar with the environment try adding graphics (ctrulib or just look at other peoples code)
https://github.com/xem/3DShomebrew/wiki/II-Setup ~ REALY REALY OUTDATED, but it could help you setup your environment at least.
These are my homebrews source feel free to look in them to see how I did certain things:
https://github.com/MrJPGames/2048-3D
https://github.com/MrJPGames/Mastermind-3DS
https://github.com/MrJPGames/Shooting-Watch-3D
https://github.com/MrJPGames/Othello-3DS ~This one uses sf2dlib, which might be a little complicated, probably want to try it later on when you've developed a few simple homebrews!
I always like to see the handful of devs grow so if you need any help please don't hesitate to ask (in this thread so others might be able to learn from it as well!)