When you buy Dogecoin, the person on the other side of the trade gets the money. Cryptocurrency exchanges maintain markets where people can submit buy or sell orders for cryptocurrencies. When your buy order is matched with a sell order, the person who submitted the sell order will get the money and you will get Dogecoin.