と is a particle that is often thought of as meaning ‘and’ in English, which is quite often how it can be translated. In a broader sense,
と simply shows that there is a relationship of ‘compilation’ between (A) and (B). That relationship could be existing together (translated as ‘
and’), or performing an action together (translated as ‘
with’).
と is required after every noun that it is grouped with. However, the last
と in a sentence will often be omitted, if there are several.
In this example, we can see that the last noun in the group (pencil) does not require the particle
と, although it is considered more correct to have it. In conversation, the last
と will almost always be omitted.