The discovery of thousands of exoplanets over the last couple of decades has shown that the birth of planets is a very efficient process in nature. Theories invoke a multitude of mechanisms to describe the assembly of planets in the disks around pre-main-sequence stars, but observational constraints have been sparse on account of insufficient sensitivity and resolution. Understanding how planets form and interact with their parental disk is crucial also to illuminate the main characteristics of a large portion of the full population of planets that is inaccessible to current and near-future observations. This White Paper describes some of the main issues for our current understanding of the formation and evolution of planets, and the critical contribution expected in this field by the Next Generation Very Large Array.