Teaching a person a useful skill can be more beneficial in the long run than filling a need temporarily, that’s essentially the meaning of this proverb. So, for example, if you give a hungry man a fish then his hunger will be satisfied, but only for a short time. If, instead, the man were taught how to fish, then he could eat whenever he got hungry. Well, assuming he is able to catch a fish whenever he wants to.
“Give a man a fire and he's warm for a day, but set fire to him and he's warm for the rest of his life.”
Terry Pratchett, Jingo