There’s a wonderful concluding section at the end of chapter 15, in which Nephi wrote about justice and how we will all stand to be judged according to our works and be rewarded with eternal blessings. That is when he said,
And if their works have been filthiness they must needs be filthy; and if they be filthy it must needs be that they cannot dwell in the kingdom of God; if so, the kingdom of God must be filthy also. But behold, I say unto you, the kingdom of God is not filthy, and there cannot any unclean thing enter into the kingdom of God; wherefore there must needs be a place of filthiness prepared for that which is filthy. (vv. 33–34)
This is not to say that a human being can be considered trash. But filthiness (or impurity) are consequences of choices made, and were of great concern to the Israelites. Nephi, who lived under and respected the Law of Moses, would have been particularly concerned about what would be done to purify or deal with the impurities that are natural consequences of sinful behavior or even unconsciously coming into contact with anything that was impure.
Nephi explained that impurity will be discarded and put into what he called "hell," behind which word may have been Gehenna (the Hebrew word often translated as "hell"). Gehenna was the valley just south of the Temple Mount in Jerusalem, and that Gehenna was the city garbage dump. At that time, there were a lot of animals in Jerusalem, and Gehenna, being the lowest part of the Jerusalem area, was where the people would sweep out all the dung, manure and garbage. That was Gehenna, and so, understandably, Gehenna was hell. Moreover, there were a lot of things burned in the dump. So, Gehenna was a place of trash and burning fires. It was a place of unpleasantness—the flaming fires of justice. That was the image of the burning and purification of filthiness which may well have stood behind what Nephi was describing. Here, again, we have an example of Lehi providing us the principle and Nephi going into greater detail in giving us the explanation.
Book of Mormon Central, "Why Do the Scriptures Compare Hell to an Unquenchable Fire? (Mosiah 2:38)," KnoWhy 81 (April 19, 2016).