It's a nonsense phrase used when someone is upset or sad. You pat them on the back and say "There, there." You can also say "there, there, everything will turn out right."
The word 'worried' has two distinct meanings: 1: afflicted with or marked by anxious uneasiness or trouble or grief; 2: mentally upset over possible misfortune or danger etc