CPLD and FPGA are different from microcontroller concept. Instead of writing programs here you need to configure hardware. With modern tools and programming languages like VHDL or Verilog things are much easier. Pyroelectro has started a series of tutorials where you will lean the very basics of building your own projects with CPLD and so with FPGA. This one is dedicated to turning LED on and off.
There are a list of courses to come where you will learn more advanced topics that will allow to feel the benefit of using CPLD over microcontrollers.