Please keep in mind that creating a new oUF layout from scratch could be a lot of work, especially if you lack understanding of Lua and how addons in WoW work. It is easier to find a layout you like and try to alter its code to suit your needs.
However, if you want to learn, here are some links that might prove helpful:
The Lua 5.1 Manual
Getting started with writing addons
Also install addons that catch and display Lua errors like !BugGrabber and BugSack.