Musical ideas are ten a penny. Anyone can have an idea. Many of us have half a dozen new ideas every day, before breakfast, after which we cannot remember any of them. The hard graft is the process of transforming the idea into a piece of music.
Thomas Edison, the inventor, summed it all up neatly in a famous quote in 1903: Genius is one percent inspiration, ninety-nine percent perspiration. Tis the same with writing music.
Given you have a musical idea, then the simplest thing you can do is repeat it.
Repetition is called ostinato, from the Italian for obstinate. And that is what repetition is and does: obstinately says the same thing again and again. Repetition is monotony, quite literally. All you have to do is make sure to stop just before the listener switches off or dies from boredom.
On the plus side, repetition is reinforcement. Repetition reinforces the message in the music. And, if a thing is worth saying in the first place, it is worth saying twice, or thrice, or oftener.
A sequence is a pattern and sequencing is a technique for creating repetitive patterns.
Repetition can be used to write a complete piece of music. A musical idea which forms a complete and coherent section in its own right can be repeated indefinitely. The technical term for this type of music is strophic.