VXX is supposed to track an index that tracks a varying proportion of the front 2 months of VIX futures. However, there appears to be an element of supply and demand at work, too, because VXX trades with a finer granularity than the VIX futures and varies in price even when the VIX futures' bids/asks are not changing. There are also days when VXX underperforms both the front 2 months' VIX futures; people posit that these are particularly lossy rollover days.
The 2 determining factors in the VXX price is 1. The vix 2. How long the VIX has been at its current position and expectations for it to remain there. I am not aware of the numerics behind the 2nd factor but for sure, it determines the price of the vxx