When you search pretty much anything on Google, the first few results are usually somewhat distinct from the rest. These are paid ads that companies use to target certain keywords and drive traffic to their websites. We call this model of internet marketing PPC, standing for "pay per click". SEO (search engine optimization), on the other hand, consists of a set of techniques to improve the ranking of your page on the organic results; everything that comes out after the paid ads.
There are lots of SEO techniques, some of which might cost you some money depending on how you go about implementing them. Once you have everything set up though, you don't have to pay a single extra penny. You'll get a constant flow of organic traffic for the work you put in. That said, it does take lots of work and time, and even then it might be difficult to overtake the competition if you're in a competitive field.
PPC gives you results much faster, but it can cost you quite a bit depending on the keywords you're targeting. Naturally, as soon as you stop paying, you stop getting visits if you're not doing anything else.
So which is better? It depends, but generally, a strategy combining both accomplishes the best results.