I think your teacher meant to say "256 square feet" because if it was inches, then sqrt(256) = 16 inches is the length of the wall. But 16 inches = 1 ft 4 inches which is way too small to be anything any person could live in.
Anyways, if the wall is 256 square feet, then the wall length is 16 feet. We basically think backwards from the thought process of "if the square wall is 16 feet in length, then its area is 16*16 = 256 square feet". The square root helps with this process quickly.
Once you know the wall length, you multiply by 4 to get the total length of wiring needed (so you can light up the entire top of each wall). This leads to 4*16 = 64 feet.
-------------------
Summary:
For one wall, you need 16 feet of lights
For all the walls combined, you need 64 feet of lights