Renting: the rental company owns, registers and insures the car. You pay for use under its terms, and you return the car at the end.
Buying: you own the car and pay its costs yourself: purchase price, Kfz-Steuer, insurance, inspection and upkeep. At the end you can keep or sell it. With CarTurf you can buy a car in Germany without a German address: you stay the owner and we handle the German registration. See registration without residency.
Prices for rentals vary widely by company, season, car and country, so this guide compares the structure of both options rather than quoting rental prices.