From a technical standpoint, tasks are what is generally known as coroutines. Coroutines are designed to emulate asynchronous-like behavior by pausing the execution of a script function until the next frame, this gives other coroutines (tasks) a chance to run. In danmakufu, the pause is represented by the "yield" keyword.
Yes, tasks work just like functions but you can use them to multitask which is something that is not possible in normal functions as they aren't designed to yield control to another task until the next frame.
task DoSomething(x,y)
{
loop
{
CreateShotA1(x,y, ...);
yield;
}
}
You can run this as many times as you want, and they will all be running together. Now if you were to change task DoSomething into function DoSomething, you'd notice that only the first one would run, and since it is an infinite loop, any other time you call this function will not be ran because the first instance never ends.
So in short, tasks can run along side other tasks without blocking anything, functions can only be read one at a time and they block execution of anything else until they have finished.