Here's the structure of the `/setblock` command: 
 
    /setblock x y z block data method [dataTag]

`xyz` are the coordinates of the block  
`block` is the TileID of the block (includes id:0 now!)  
`data` is the block data (i.e. 5:1 spruce wood)  
`method` is one of three things: `keep`, `replace`, or `delete`
  
- `keep` spawns the block at the coordinates.  
- `replace` replaces the block at the coordinates with the block ID.  
- `delete` removes the block at the coordinates and then spawns the new one in  

`dataTag` (optional) is tile entity data.  

From [Minecraft wiki](https://minecraft.wiki/w/Tutorials/Command_Block)