About
An agent is a node (a machine, or container) which connects to a Jenkins master and executes tasks when directed by the master.
Articles Related
Pipeline Syntax
https://jenkins.io/doc/book/pipeline/syntax/#agent
The agent section specifies where the entire Pipeline, or a specific stage, will execute. The section must be defined at the top-level inside the pipeline block.
docker
Execute the Pipeline, or stage, with the given container which will be dynamically provisioned on a node