I don't know why you have a variable with newlines; maybe you should review your design!
Anyways, in bash 4, the cleanest and most efficient way is to use mapfile:
myvar=$'line1\nline2\nline3\nline 4 with spaces in it\nline 5 with no trailing newline'
mapfile -t myarray <<< "$myvar"
for i in "${myarray[@]}"; do
echo "Line is: $i"
done
There's another possibility, fiddling with IFS, but that's too ugly for this purpose.
Notice that, unlike the accepted answer (which shows terrible bash practices — you guys should definitely stop supporting bad practices and broken codes), this works fine with spaces.
Now, if your variable myvar is in fact obtained from a file (since you accepted the answer that shows this, it might be your case), to directly obtain the content of the file file.txt in an array, the fields of which being the lines of the file, use:
mapfile -t myarray < "file.txt"
for i in "${myarray[@]}"; do
echo "Line is: $i"
done
And it will be more efficient too.