Each bitcoin node connects to a number of other nodes on the bitcoin network (peers). Think of it like friends you share information with. You can ask them for information, and they can ask you too.
So new bitcoin nodes, when they first start, find other peers on the network, and then the new node will start asking for bitcoin blocks from the blockchain that it doesn't yet have (all of them!). All the peers will respond, sharing the requested blocks from their own copies of the blockchain.
As the blocks arrive, your new node will validate that the block is valid and that all the transactions are valid, and that it is linked the the prior block, and having done that - add it to its own copy of the blockchain.
This process iterates for all the blocks from 2009, up to today and can take anywhere from a day to a few weeks depending on a whole bunch of factors. Good news is that it only has to be done once! After that Initial Block Download (IBD) is complete, keeping up to date is very little work - one block every 10 minutes or so.
Your node will be helped a lot by your peers during IBD, and then once you're fully synced, your node will be able to help others.
Equally, if your node, or one of your peers is switched off for a while, when they come back the same process repeats so that you get up to date again.
Pretty clever really :-)