This is fully explained / documented on MS website and in videos on MS channel9 or even YouTube vids as well as all over the web on many sites. Give those a spin, try some things and get back to us.
Introducing PowerShell Desired State Configuration (DSC)
Desired State Configuration (DSC) is a feature in PowerShell 4.0 and Windows Server 2012 R2 that helps Windows administrators manage and deploy software services' configuration data and the environment the services run in. DSC provides a set of PowerShell language extensions, cmdlets and a process called declarative scripting.
Learning PowerShell DSC – Second Edition: Automate deployment and configuration of your servers
17 Hours of PowerShell Desired State Configuration (DSC) Video Training