
There are several short answers to this, from nothing to as much as you want to spend, but maybe that is not so helpful.
A lot will depend on your ultimate aim, do you want to find out for just yourself, or your close family or do you want to present your findings to the world at large as a properly researched scientific work.
Most people start off small, just trying to find some recent history for their own pleasure or to satisfy curiosity of family members. Most research can be done by talking to family members, collating their recollections and collecting copies of any paper documents they have. All it will cost is your time and maybe travel expenses or telephone calls. Storing the data so you can get it back later is either handwritten notes and files, or use a computer to store word processor documents or you could get a dedicated genealogy programme.
The software option is where many people make the mistake of buying something that locks them into that system. I would recommend something like Gramps, it is free open source software that is easy enough for a beginner but has advanced features for professional use. If you do not like it or drop the research then it has cost you nothing.
The next step on your journey will take you places where there are multiple options and increasing price tags. Research outside your relatives memory will, these days, take you to online genealogy search sites. My recommendation is do not pay to access any site until you know what you are doing and how to do it. It may seem easier to join something like Ancestry but you could trap yourself. You will not be able to download everything you upload, if you stop paying the subscription you will not have access to your data, and there are other problems. Similar stories can be applied to other sites.
Initially you can get a long way with family search, which is free to search and does have many full records you can see, some will link to another pay sites but at least you know there is a record to find. Another advantage is that family search covers many countries.
If you need data for a specific country then there are many free search sites that can be found. For the UK there is freebmd and sister sites covering census pages and parish records. For Nederland try wiewaswie (who was who) which might also help with S. African records. Cyndies list is the place to go to find more reseaech aids.
Once you have researched as far as you can easily then it might be time to consider paying to access more data, but now you might have some idea where to look and be able to judge the value for money in your case.
As a guide, my own tree had 2500 people on it back to the 1500’s on 5 continents before I considered subscribing to a site, the determining factor was the missing citations of sources. I had made notes which allowed me to find the unseen records but to prove my research I needed to see the original records.
So to answer my question, you can do a lot at no cost, but if you want to call yourself a genealogist then you will need to pay something to do the job correctly. It could be that one site does not cover all the areas you need but expect to pay around 100 $, euro or pounds a year per site, take advantage of special offers which appear very often, often let your subscription lapse at the end of the year and a month or so later you may get a 50% discount to rejoin.