Vedic mantras, or the words of the Vedas, are traditionally understood to be infinite and endless, meaning that there are an innumerable number of Vedic mantras.
Some of these mantras, from the infinite set of mantras, are revealed to Rishis.
Vedic mantras are of 3 types: Rk, Yajus, or Saman.
The Purva Mimamsa Sutras give a definition for each type of mantra.
Definition of Rk:

Definition of Saman:

Definition of Yajus:

Definition of Atharva:
The Atharva Veda actually consists of a combination of all 3 mantra types. There is no mantra type "Atharva."
Why did the one Veda split into four?
So, now we've established that there are an infinite number of Rk mantras, infinite number of Yajus mantras, and an infinite number of Sama mantras, and a select number of each type of mantra are revealed to Rishis.
Before Kali yuga, all the different mantras types were jumbled into one Veda, and people had to remember the entire Veda. But at the end of Dwapara Yuga, Vedavyasa put all the Rk mantras into one group, the Yajus mantras into one group, and the Saman mantras into one group. The group of Rk mantras is known as Rigveda, the group of Yajus mantras as Yajurveda, and the group of Saman mantras as Samaveda.
Srimad Bhagavata Purana:
Text 46: In this way, throughout the cycles of four ages, generation
after generation of disciples — all firmly fixed in their spiritual
vows — have received these Vedas by disciplic succession. At the end
of each Dvāpara-yuga the Vedas are edited into separate divisions by
eminent sages.
Text 47: Observing that people in general were diminished in their
life span, strength and intelligence by the influence of time, great
sages took inspiration from the Personality of Godhead sitting within
their hearts and systematically divided the Vedas....
In this form, named Kṛṣṇa Dvaipāyana Vyāsa, he divided the one Veda
into four.
Text 50: Śrīla Vyāsadeva separated the mantras of the Ṛg, Atharva,
Yajur and Sāma Vedas into four divisions, just as one sorts out a
mixed collection of jewels into piles. Thus he composed four distinct
Vedic literatures.
Why do different Shakhas (recensions) exist for each Veda?
The reason is because Vedavyasa taught his sishyas each Veda, and each sishya further taught only a part of the Veda to his sishyas. For example, assuming I have 1000 Rk mantras, I will teach 500 of those 1000 mantras to one disciple, and the other 500 to another. Now, you have 2 Shakhas of the Rig veda, named after each Rishi or sishya who learned and propagated the recension he learned.
So, a Shakha is a part of the mantras of a revealed Veda.
Srimad Bhagavata Purana:
Rig Veda shakhas:
Text 51: The most powerful and intelligent Vyāsadeva called four of
his disciples, O brāhmaṇa, and entrusted to each of them one of these
four saṁhitās.
Texts 52-53: Śrīla Vyāsadeva taught the first saṁhitā, the Ṛg Veda, to
Paila and gave this collection the name Bahvṛca. To the sage
Vaiśampāyana he spoke the collection of Yajur mantras named Nigada. He
taught the Sāma Veda mantras, designated as the Chandoga-saṁhitā, to
Jaimini, and he spoke the Atharva Veda to his dear disciple Sumantu.
Texts 54-56: After dividing his saṁhitā into two parts, the wise Paila
spoke it to Indrapramiti and Bāṣkala. Bāṣkala further divided his
collection into four parts, O Bhārgava, and instructed them to his
disciples Bodhya, Yājñavalkya, Parāśara and Agnimitra. Indrapramiti,
the self-controlled sage, taught his saṁhitā to the learned mystic
Māṇḍūkeya, whose disciple Devamitra later passed down the divisions of
the Ṛg Veda to Saubhari and others.
Text 57: The son of Māṇḍūkeya, named Śākalya, divided his own
collection into five, entrusting one subdivision each to Vātsya,
Mudgala, Śālīya, Gokhalya and Śiśira.
Text 59: Bāṣkali assembled the Vālakhilya-saṁhitā, a collection from
all the branches of the Ṛg Veda. This collection was received by
Vālāyani, Bhajya and Kāśāra.
Text 60: Thus these various saṁhitās of the Ṛg Veda were maintained
through disciplic succession by these saintly brāhmaṇas
Yajur Veda shakhas:
Texts 64-65: Yājñavalkya, the son of Devarāta, then vomited the
mantras of the Yajur Veda and went away from there. The assembled
disciples, looking greedily upon these yajur hymns, assumed the form
of partridges and picked them all up. These divisions of the Yajur
Veda therefore became known as the most beautiful Taittirīya-saṁhitā,
the hymns collected by partridges [tittirāḥ].
Text 74: From these countless hundreds of mantras of the Yajur Veda,
the powerful sage compiled fifteen new branches of Vedic literature.
These became known as the Vājasaneyi-saṁhitā because they were
produced from the hairs of the horse’s mane, and they were accepted in
disciplic succession by the followers of Kāṇva, Mādhyandina and
other ṛṣis.
Sama Veda shakhas:
Text 75: Jaimini Ṛṣi, the authority of the Sāma Veda, had a son named
Sumantu, and the son of Sumantu was Sutvān. The sage Jaimini spoke to
each of them a different part of the Sāma-veda-saṁhitā.
Texts 76-77: Sukarmā, another disciple of Jaimini, was a great
scholar. He divided the mighty tree of the Sāma Veda into one thousand
saṁhitās. Then, O brāhmaṇa, three disciples of Sukarmā — Hiraṇyanābha,
the son of Kuśala; Pauṣyañji; and Āvantya, who was very advanced in
spiritual realization — took charge of the sāma-mantras.
Text 78: The five hundred disciples of Pauṣyañji and Āvantya became
known as the northern singers of the Sāma Veda, and in later times
some of them also became known as eastern singers.
Atharva Veda shakhas:
Text 1: Sūta Gosvāmī said: Sumantu Ṛṣi, the authority on the Atharva
Veda, taught his saṁhitā to his disciple Kabandha, who in turn spoke
it to Pathya and Vedadarśa.
Text 2: Śauklāyani, Brahmabali, Modoṣa and Pippalāyani were disciples
of Vedadarśa. Hear from me also the names of the disciples of Pathya.
My dear brāhmaṇa, they are Kumuda, Śunaka and Jājali, all of whom knew
the Atharva Veda very well.