I just wanted to know if price changes how much quantity is supplied or demanded then what creates the price in the first place? If you say that price affects supply and demand and supply and demand affect price then this just sounds like circular logic to me.
First, it is important to understand the difference between a few concepts. The demand is a function that describes that the quantity demanded (consumption) declines as the price increases. That is, the demand is the relationship between the quantity demanded and the price. Similarly, the supply is a function that describes that the quantity supplied (production) increases as the price increases. It is the relationship between the quantity supplied and the price.
The equilibrium price (market price) is determined by the intersection of the demand and the supply. At the equilibrium price, the quantity demanded equals the quantity supplied; hence we can refer to the equilibrium quantity.
There is no circularity. The equilibrium price and the equilibrium quantity are the realization of where the demand and the supply meet. The demand and supply can shift in response to external factors and the equilibrium price and the equilibrium quantity will respond accordingly. For example, an increase in population will cause and increase in the demand, meaning that the quantity demanded at a given price will increase. The increase in the demand will cause and increase in the equilibrium price and an increase in the equilibrium quantity.