The Lord told Isaiah to walked naked in the streets and Isaiah did so for 3 years as a messages to God's people. The context in time is that Assyria had sent Tartan to attack Ashdod and the prophecy was against Egypt and Ethiopia which are going to be conquered by the Assyrians. The message from God was that it was pointless for Israel to trust in the protection from Egypt and Ethiopia, since they will be defeated, and Israel would soon follow. The actual fulfilment of the prophecy would be that when Assyria conquered Egypt and Ethiopia, their captives would be taken away naked.
The Sign Against Egypt and Ethiopia
1 In the year that Tartan[a] came to Ashdod, when Sargon the king of Assyria sent him, and he fought against Ashdod and took it, 2 at the same time the Lord spoke by Isaiah the son of Amoz, saying, “Go, and remove the sackcloth from your body, and take your sandals off your feet.” And he did so, walking naked and barefoot.
3 Then the Lord said, “Just as My servant Isaiah has walked naked and barefoot three years for a sign and a wonder against Egypt and Ethiopia, 4 so shall the king of Assyria lead away the Egyptians as prisoners and the Ethiopians as captives, young and old, naked and barefoot, with their buttocks uncovered, to the shame of Egypt. 5 Then they shall be afraid and ashamed of Ethiopia their expectation and Egypt their glory. 6 And the inhabitant of this territory will say in that day, ‘Surely such is our expectation, wherever we flee for help to be delivered from the king of Assyria; and how shall we escape