Start here for the basics

https://duet3d.dozuki.com/Wiki/ConfiguringRepRapFirmwareCartesianPrinter

And here for the specifics of corexy

https://duet3d.dozuki.com/Wiki/ConfiguringRepRapFirmwareCoreXYPrinter