This question has two possible answers, both of which are extremely complex.
The religious/spiritual answer is that the universe is a creation of an omnipitant and omniscient God, who is working towards some unknowable goal. In this model, the universe has a specific design and plan, and everything in it, especially humans, were created for the sole purpose of playing roles in this plan. Humans may be destined to their fate, or they may have completely free will, but there is a goal at the end.
The scientific answer is that the universe is an almost infinite space with matter and energy moving in a random pattern based mostly on mass and gravity, but with theoretical influences from the quantum level of reality. In this model, there is no larger purpose to the universe except what is given to it by sentient beings; humans may or may not be the only sentient beings in the universe, and so have a responsibility to make their own destiny. The universe might be infinite and eternal; it may reach a state of entropy or collapse in the future. Either way, it is the means of expression for intelligent life.
Neither of these answers is complete in and of itself. To fully understand any nature of the universe, deep study is needed, and only the individual can decide the ultimate purpose of the universe. In the end, one individual will never see the ultimate fate of everything, and so the nature and purpose of the universe must be decided on a smaller and more personal level. Yet on a more practical level, cosmologists define the nature of the universe in terms of the debatable elements of "the determinations of Omega and Lambda, the mass density of the universe, and the corresponding geometry of the universe."