Waw and ya are the two Arabic letters that do more than one kind of work, and waw does three.
First it is a consonant, the w of English, and in that role it behaves like any other letter: it takes a vowel, it can be doubled, and it forms part of the consonantal root of a word. Second it is a long vowel. Arabic writes three long vowels using three letters, alif for long a, waw for long u and ya for long i, and this is why the script is described as an abjad with matres lectionis rather than as a pure consonantal alphabet: the long vowels are on the page even though the short ones are not. Third, standing by itself and written attached to the front of the following word, waw is the ordinary Arabic word for and.
The third job has a visible consequence. Arabic does not put a space between this conjunction and the word it joins, so a great many words on an Arabic page begin with a waw that is not part of them. A reader parsing a text has to decide, word by word, whether an initial waw belongs to the word or is the conjunction attached to it, and the same is true of several other one letter particles, including the lam of the definite article and a preposition written as a single ba.
Roots containing waw or ya behave irregularly in Arabic morphology for the same underlying reason: a letter that is sometimes a consonant and sometimes a vowel shifts, lengthens or disappears as the pattern around it changes. Verbs built on such roots are treated as a separate class in every Arabic grammar, and they are the part of the verb system that takes longest to learn.