1) Is it possible to do a tree farm? I heard you could do this in previous versions, but I have no ideas how to do it.
Yes. Dig out a large area, get it muddy, and clear all stone from it. If you have discovered at least one of the caverns, then underground trees will begin growing on the mud. It's as simple as that.
2) Where are the caves in general? I mean, how much z-levels underground? This could really help me to search.
It varies somewhat depending on worldgen parameters, but by default the first is usually 5-10 z-levels below the lowest surface land, the second is 1-5 z-levels below the bottom of the first cavern (which may be 10+ z-levels tall), the third 1-5 z-levels below the bottom of the second, and the magma sea 1-5 z-levels below the bottom of the third cavern.
3) Is there any profit for exploring a cavern? Is it just a funny way to loose soldiers?
There's wood to be found in the caverns, exposed mineral veins so you don't have to do exploratory mining, silk to make cloth with, and various exotic creatures that can be captured. Overall, the caverns are somewhat more useful, and somewhat safer in many cases, than the surface is, so ask yourself: is there any profit from using the surface resources, or is it just a funny way to put workers at risk?
4) Final question. Is there magma in the caverns? I know about magma sea, but is there other places?
There is sometimes a magma pipe that comes up to the level of one of the caverns, which provides an infinite source of magma there. They are most common near volcanoes and other highly-igneous stone regions.