NETCONF is a network configuration protocol defined by the IETF and inspired from Juniper's Junoscript protocol.
YANG is a data modeling language defined by the IETF, and inspired by Juniper's homegrown DDL language, that is used to model configuration and state data changes by the NETCONF protocol.
So why do we need NETCONF and YANG?
NETCONF is used to “install, manipulate, and delete the configuration of network devices." NETCONF client server communication language is based on XML. Not limited to just configuration management, NETCONF is also very useful for programmatically managing device operations, notifications, analytics, and all aspects of network device management.
Looking at the network landscape of today
Network management systems are required to "understand and use" device-specific syntax for every device. Each vendor’s device will have its own set of configuration/operation syntax to do essentially the same thing. For instance, configuring a simple BGP parameter requires the operator to learn three different syntaxes to do the same thing. Not exactly optimal.
A better way?
Is there a better way to reduce this complexity and complete a a multi-vendor network configuration challenge?
How about a standard protocol and a standard language to communicate with all the devices in the network, vendor-agnostic. Is there a way to extend this language to where the operators can define their own instructions? [superset, overlay of the existing device capabilities - consider the Microsoft Macro's from 2000]
NETCONF and YANG solve this problem.