Just because you're not getting paid doesn't make you a volunteer. This is why there are usually different visa schemes for genuine volunteering for a charity and non-paid work (e.g. unpaid internships or au-pair), and each of these will have different requirements. For Denmark:
- volunteer workers should be between 18 and 30 and work should be of a "social or humanitarian character". Looking at additional info this "cannot be ordinary salaried work, e.g. cleaning".
- interns can do unpaid work if as part of their studies (i.e. summer abroad as part of a university degree). The host must also be approved to take on interns.
- young persons on an au-pair permit do some housework for their host family, and can do other unpaid work but not directly benefiting their host family e.g. they couldn't work in the family shop but might do some other volunteer work in the local community.
Many people in your situation presume that if you don't get money, it's not "work", but work of a set number of hours a day for a non-charitable entity (farm, hostel, etc.) in return for non-monetary payment (i.e. room and board) is work under the law in many countries, including Denmark, no matter how much travellers would like it to count as "volunteering", or how many people tell you they did it and didn't have any problems.
- You could get refused entry to the country or deported later on
- If the above happens, this could impact future visa applications to Denmark or other countries
- If injured on the job, you may find your travel insurance refuses to pay out
There are some grey areas, of course. Things to consider:
- whether the entity you're working for is a genuine charity or a commercial business
- whether your work is incidental (a couple of days out of a few weeks travelling) vs. the main part of your visit (a month or two spent entirely working for room and board)
- whether your work is equivalent to a job that would otherwise be done by a local person for a wage. A lot of farm work is seasonal/casual anyway, so the length of time you're doing this work is irrelevant.
For example, if as part of your travels you spent a couple days on a farm where you helped gather the vegetables that would be used to cook dinner, then helped cook dinner for you and the family you're staying with, that might arguably be part of some sort of cultural experience learning about farm life and local cuisine.
If you plan to spend your entire holiday on a farm working 4-5 hours a day harvesting vegetables in return for your accommodation, that will be considered work.
Probably your best bet is to find some sort of homestay scheme where you pay for a room in a house, living and eating with a family. This can often be much cheaper than a hotel particularly where food is included. If you just want to experience staying on a farm, the Danish word you're looking for is "bondegårdsferie"-- a paid experience, but again could work out cheaper than hotel plus you may get to pet a cow. You can certainly help out with incidental chores in a homestay or farmstay situation e.g. helping to feed the horses or doing a few dishes.