“What is the meaning (or purpose) of life?”
This is my long and complicated theoretical answer, which may or may not help you and can be skipped for the short, practical answer:
The ultimate purpose of man’s life is his blissful enjoyment of a perfectly loving relationship with God. Blissful enjoyment is the effect of a perfectly loving relationship with God; and a perfectly loving relationship with Him has (a) passive reception of His Infinite Love and also (b) passionate, active loving of Him, both being to the man’s maximum created capacity. Love in general is a strictly spiritual act involving the cooperation of one’s Intellect and Will, meaning love properly entails both knowing and willing on the part of the lover. Spirit is the union of Intellect and Will in the act of love, after the Mind grasps a thing’s truth and goodness and the Will is naturally attracted to that perceived good; love is the actual resulting motion, not just the dispositional draw, of the whole self to the thing loved.
It is his loving spirituality that ultimately and completely unifies (or, if directed at the wrong thing, internally divorces and dissolves) a man’s basic components, as he depends on a loving bond with God for his very soul’s being. [Intellect and Will (in harmony = spirit) make up the formal, immaterial principle of the soul; the Body is the material principle. A man’s soul *is his form (= a rational animal; a mind and volition inhering in a bodily substance), whereas the actual man himself is the body ensouled by that formal principle.] So a man is by nature a complex of parts, of aspects of existence, soul and body, which he cannot entirely sustain or create himself, since, for one, that would be like his creating and causing his own existence. God’s Love is what unifies our parts into one individual substance. Our external unity, which is our existence as selves, can only be grounded, in the end, in Him. Our partial internal unity, and happiness and goodness, has been to a degree Divinely left in our own hands, to our free will, i.e., our capacity to self-determine, to drastically shape our own souls and choose what to love and to what extent.
Short:
What the other posters said. Love God fully.
Except, you were born with original sin and a fallen, corrupted nature, so you’re thus doomed to whimsically flail around in the darkness, unable to adequately see and know He Whom you need to love. Unless you find Christ, listen to Him faithfully, and follow Him hopefully. You should do so as best you can in this fallen world, where you will not achieve perfect happiness. Actually, if you do it right, you’ll suffer extremely, grow uprooted from this life, and be widely treated like dirt, like He did. So join with Christ’s other followers, His Church, the Catholic Church, and be sure to participate in any means to grace you can reach, and often, meaning through the sacraments. Eventually, don’t stop to check on your own progress or vainly check yourself out in the “spiritual mirror,” since your gaze must become only focused on one thing, God, your only care being Him, all your worldly cares merely flowing prudently as the effects of your love for His created order and command.
“Why did God create man?”
Slightly tougher. The following is from New Advent’s online Catholic Encyclopedia:
newadvent.org/cathen/04470a.htm