The short answer
In Jewish tradition, 42 is linked with the journeys of the Israelites through the wilderness and with a divine name said to have 42 letters. Judaism does not give the number one fixed meaning. Most of the connections come from later commentary and tradition rather than from a direct statement in the Bible.
The 42 journeys in Numbers 33
The most direct source is Numbers 33. It lists the places where the Israelites camped after leaving Egypt, and the list has 42 stops. The count is clear from the text, even though the meaning people give it is a matter of interpretation.
Some later teachers, including the Baal Shem Tov, read the stops as a pattern for a person’s life. In that reading, each stop stands for a step in the soul’s path, from its arrival in the world to its return to its source. That is a traditional reading, not a required teaching.
The 42-letter name of God
The Talmud, in Kiddushin 71a, refers to a divine name of 42 letters. Later sources describe the name in different ways, and some link it to the opening letters of the Torah. Sources do not all agree on its exact form.
Because of this, the 42-letter name is best understood as a traditional idea that shaped how Jewish writers thought about 42, rather than as a fact that can be checked on a page.
Other places 42 appears
Some prayers are counted at 42 words in traditional or common counts. The prayer Ana BeKoach is often described this way, with seven lines of six words each. Some traditions also count the 42 words of the paragraph called V’ahavta. These counts depend on how a text is divided, so readers should not treat them as settled.
42 in Hebrew letters
In Hebrew, 42 is written מב (mem-bet). Mem is the 13th letter of the alphabet and has the value 40, and bet is the second letter and has the value 2. Adding them gives 42. Hebrew letters carry number values, which is why the 22 hebrew letters in order matter for reading numbers in Hebrew texts.
Outside Judaism
Many English speakers know 42 from a comic science-fiction novel, where it is given as the “answer” to life, the universe and everything. That joke has no Jewish source. It is useful to keep the two separate when you read about the number, because the Jewish ideas come from texts and commentaries, not from a single punchline.
How to read these meanings
The associations above are traditional readings. They differ between communities and teachers, and none is a central doctrine of Judaism. If you want the view of a particular community, a rabbi or teacher there can explain how they read the number and why.