Parallel constructions are important in writing to demonstrate balance and to order like items with like.
Hence, any word will seek its own kind: noun to noun, adjective, to adjective, infinitive to infinitive.
Their work clothes included shoes, boots and wide-brimmed hats.
In the first example, all the items are nouns: shoes, boots, and hats.
To work or not to work—that is the question.
In the second example, the parallel structure relates to the infinitives: to work.
The students are not only planning social events, but also are interested in international affairs.
The problem with the above sentence is the first half relies on "planning" in active voice and the second half switches to "interested" in passive voice.
The students are not only planning social events, but also are discussing international affairs.
Parallelism may become more confusing and complex when used with phrases or clauses rather than just words. See phrases and clauses.
The general rule is that equivalent ideas should all be of the same grammatical kind to stress their equivalence and to strengthen their impact. By expressing parallel ideas in grammatically equivalent structures, the writer's ideas are clearer and more understandable for the reader.