From just about the time people started building boats, they've tried to keep the hulls foul-free. The fact is that many marine animals and plants consider boat hulls a perfect place to live. That, of course, makes it harder for your vessel to move through the water, so you need more and more energy for less and less movement.
Those early seafarers tried tar and oil to discourage hangers-on. They tried thin sheets of metal and then paints based on copper and tin. Some of these methods were not very effective or practical.