How do you get a block from a block in creative?
They use an action described in the game controls as 'pick block'. By default it's the middle mouse button (“mouse 3”).
It is called Pick Block, and by default it is set to MMB (Middle-click).
In creative, it adds the block to your inventory.
Many people do not know, though, that if you're in survival, you can also use it. When used in survival it puts the block in your hand if you have it in your inventory. For example, if I look at andesite and have andesite in my inventory, I can pick block the andesite and it will move straight to my hand. If you look at a block that is not in your inventory and try to pick block it, nothing happens.
You can also copy the block along with the data. Pressing CTRL + MMB (change MMB with whatever you bind it to, but CTRL cannot be changed) will copy the block along with its data. For example, if there is a command block with a command in it just pressing MMB on it will copy an empty command block. Pressing CTRL + MMB will copy the block along with the command inside of it.
To pick up the block you are looking at on PC/Mac, press down the scroll button. There are no current ways to collect the block you are looking at on the Console editions, or Pocket Edition.