Why would a playbook contain several plays, and how are they written?
To orchestrate a deployment where different host groups need different tasks in a fixed order, for example configure the web servers and then the database servers. Each play is simply another top-level list item with its own name, hosts and tasks.
# This is a simple playbook with two plays
- name: first play
hosts: web.example.com
tasks:
- name: first task
yum:
name: httpd
state: present
- name: second task
service:
name: httpd
enabled: true
- name: second play
hosts: database.example.com
tasks:
- name: first task
service:
name: mariadb
enabled: true
A play binds one set of hosts to an ordered list of tasks. When a job spans several kinds of machines, one play cannot express it, because a play has a single hosts target. So you write one play per target and put them in one playbook. Plays run in file order: Ansible finishes the first play on its hosts, then starts the second. That ordering is what makes the playbook an orchestration ("first the app servers, then the load balancer").
Watch the argument names: the yum module's option is state: present. A typo like status: present is rejected as an unsupported parameter.
Go deeper:
Ansible playbooks (official docs) — multiple plays in one playbook and how they execute.
What is an Ansible Playbook? (Red Hat) — plays as the unit that maps hosts to tasks.