Joshua sent two spies to Jericho to assess the city before Israel's invasion. They stayed at the house of Rahab, who is described as a prostitute but may have been more accurately an innkeeper based on historical context. Rahab's faith led to her being integrated into the lineage of Israel's future leaders, illustrating her significant role despite her societal label.