Creating your own Bitcoin price ticker
There are two possible actors that may build a ticker: exchanges and observers.

Exchanges actually perform trades on their platform so they'll likely be using the last price a trade was performed as the current price.

Observers do not trade themselves and will have to rely on exchanges to get the raw data on trades. They'd then pick the last trade price for each exchange and combine them into a single value. A wide range of schemes is available to merge the values. CoinDesk for example uses an average weighted by an exchanges daily volume.