How to estimate empirically a demand curve Suppose I have a small business that sell ice creams.
An Icecream cost 2$, and every day I have different values of sales.

Day 1: 50 sales
Day 2: 70 sales
Day 3: 30 sales
Day 4: 50 sales


How to I estimate the demand curve?


Should I change every day the price of the icecream and see how many sales I get? (the variation could be caused by many other factors)
Should I do a linear regression on the sales data?
I think You will have to account for various factors other than price. What is your purpose in estimating the demand curve? 

This link will give you a good explanation on how to estimate demand curves if you are looking for simple exposition - assuming that sales and other factors have linear relationship. 

If you are good at econometrics, you may want to consider simultaneous equations models. It is likely that your single equation model will suffer from simultaneity and omitted variable bias along with identification problems.