Jenkins "Pipeline as code" allows you to define and automate pipelined job processes with code. Code that can be stored and versioned in a repository which allows you to track changes over time and used by jenkins to run build jobs.
To use Pipeline as code, projects must contain a file named Jenkinsfile in the repository root, which contains a "Pipeline script" that specifies the steps to execute the job.
A Jenkinsfile can be written using two types of syntax - Declarative and Scripted.
Scripted pipeline is built upon groovy and is more suitable for jobs that have a considerable amount of complexity whereas Declarative Pipeline was created to offer a simpler and more opinionated syntax for authoring Jenkins Pipeline.
You could have a look at these references for more info on the concepts of pipeline as code and also syntaxes of writing a scripted or declarative pipeline:
For a beginner's guide on creation of pipeline tutorial you could refer to this blog: