悩む - to be worried; It is intransitive in this case, since it does not take an object. Next, notice the form of the verb:
悩まず ＝ 悩まない - to not be worried.
The particle に turns the former verb phrase into an adverbial phrase. It's describing the manner of the next action, which is:
生きる - to live. So what we have so far is 悩まずに生きる - "To live without worry." Finally the particle こと turns a verb into a noun, so, instead of "to live" it becomes "living." Putting it all together you have "living without worry(ing)." In the context of the story, I assume this came during the song "Hakuna Matata" and the phrase you provided is the explanation of that.
That's the best I know how to explain it and since you are a beginner, I would suggest switching to something a bit simpler in grammatical structure. However, watching movies is great practice. I hope you understood my explanation. If you have any further questions, don't hesitate to ask.