Theory:

Refrain is a type of repetition found in poetry. In this type of repetition, a phrase, a line, or lines are repeated instead of a word.
Pronunciation Guide
Refrain-- re (as in "remember")-- fra (as in "phrase")-- in (as in "pain")
In a refrain, a line can be repeated either with lines in between or not. Let us take the following poem by David Bates as an example:
Example:
Speak gently! – It is better far
     To rule by love, than fear
Speak gently – let not harsh words mar
     The good we might do here!
 
Speak gently! – Love doth whisper low
     The vows that true hearts bind;
And gently Friendship’s accents flow;
     Affection’s voice is kind.
 
Speak gently to the little child!
     Its love be sure to gain;
Teach it in accents soft and mild:-
     It may not long remain.
 
Speak gently to the young, for they
     Will have enough to bear –
Pass through this life as best they may,
     ‘T is full of anxious care!

Speak gently to the aged one,
       Grieve not the care-worn heart;
The sands of life are nearly run,
      Let such in peace depart!
 
Speak gently, kindly, to the poor;
      Let no harsh tone be heard;
They have enough they must endure,
     Without an unkind word!
 
Speak gently to the erring – know,
     They may have toiled in vain;
Perchance unkindness made them so;
     Oh, win them back again!
 
Speak gently! – He who gave his life
     To bend man’s stubborn will,
When elements were in fierce strife,
     Said to them, ‘Peace, be still.’
 
Speak gently! – ’tis a little thing
     Dropped in the heart’s deep well;
The good, the joy, which it may bring,
     Eternity shall tell.
"Speak gently" is the refrain in the poem. It is repeated constantly throughout the poem, with intervals (or lines in between). 
 
Refrain can appear anywhere in the poem, with or without the intervals. It can appear at the beginning of the stanzas like the above example. It can also appear at the end, like the one seen in the poem "Stopping by Woods on a Snowy Evening" by Robert Frost.
Example:
Whose woods these are I think I know.  
His house is in the village though;  
He will not see me stopping here  
To watch his woods fill up with snow.  
 
My little horse must think it queer  
To stop without a farmhouse near  
Between the woods and frozen lake  
The darkest evening of the year.  
 
He gives his harness bells a shake  
To ask if there is some mistake.  
The only other sound’s the sweep  
Of easy wind and downy flake.  
 
The woods are lovely, dark and deep,  
But I have promises to keep,  
And miles to go before I sleep,  
And miles to go before I sleep.
The above poem is also an example to show that the lines can be repeated immediately without intervals.
According to J.A.Cuddon, refrain is "a phrase, line or lines repeated at intervals during a poem and especially at the end of a stanza". 'Very often it is an exact repetition but sometimes it will undergo a slight modification'. 
As Cuddon pointed out, refrain can also happen with modification. Let us take the following poem "Disdain me Not" by  Sir Thomas Wyatt as an example:
Example:
Disdain me not without desert,
Nor leave me not so suddenly;
Since well ye wot that in my heart
I mean ye not but honestly.
Disdain me not.
 
Refuse me not without cause why,
Nor think me not to be unjust;
Since that by lot of fantasy
This careful knot needs knit I must.
Refuse me not.
 
Mistrust me not, though some there be
That fain would spot my steadfastness;
Believe them not, since that we see
The proof is not as they express.
Mistrust me not.
 
Forsake me not till I deserve
Nor hate me not till I offend;
Destroy me not till that I swerve;
But since ye know that I intend,
Forsake me not.
 
Disdain me not that I'm your own:
Refuse me not that I'm so true:
Mistrust me not till all be known:
Forsake me not ne for no new.
Disdain me not.
The above contains several other types of repetitions as well. However, what is to be noted here is that this poem contains two sets of refrains.
 
The first set of refrains can be seen in the individual stanzas. Each stanza has a refrain that appears in the beginning and the end. For example, the second stanza contains the refrain "refuse me not" at the beginning and in the end.  
The second set can be seen in the poem as a whole. Throughout the poem, the phrase "disdain me not" is repeated with modification. Words such as refuse, mistrust, and forsake are used as modifications here.
Hence, if a line or a phrase is repeated, it is called a refrain
Refrain from the poem "Meadow Surprises"
Example:
Meadows have surprises,
You can find them if you look;
Walk softly through the velvet grass,
And listen by the brook.
 
You may see a butterfly
Rest upon a buttercup
And unfold its drinking straws
To sip the nectar up.
 
You may scare a rabbit
Who is sitting very still;
Though at first you may not see him,
When he hops you will.
 
A dandelion whose fuzzy head
Was golden days ago
Has turned to airy parachutes
That flutter when you blow.
 
Explore the meadow houses,
The burrows in the ground,
A nest beneath tall grasses,
The ant’s amazing mound.
 
Oh! Meadows have surprises
And many things to tell;
You may discover these yourself,
If you look and listen well.
The final stanza of the poem begins with a repetition of the first line from the first stanza. Hence, the line "Meadows have surprises" becomes a refrain.
 
The line "you may discover these yourself" can also be seen as a repetition of the line "you can find them if you look" from the first stanza. Though the lines are not repeated word-for-word, the essence and the word order are retained in both the lines. Hence, it can be seen as a form of repetition.
Reference:
State Council of Educational Research and Training (2019). Term-1 English Standard-7. Your Space by David Bates (pp. 70-72). Published by the Tamil Nadu Textbook and Educational Services Corporation.
 
https://www.poetryfoundation.org/poems/42891/stopping-by-woods-on-a-snowy-evening
 
https://allpoetry.com/Disdain-Me-Not
 
Cuddon, J.A. A Dictionary of Literary Terms and Literary Theory. West Sussex, Wiley-Blackwell Publication, 2013.
 
National Council of Educational Research and Training (2007). Honeycomb. Meadow Surprises: Lois Brandt Phillips (pp. 123-124). Published at the Publication Division by the Secretary, National Council of Educational Research and Training, Sri Aurobindo Marg, New Delhi.