I gonna tell it in a pair simple steps c;
1. Place the block you want turn into a chest make sure you build a wall around it
2. Place a command block above the block you want turn into a chest
3. Paste in the command ( tip: typ in ''Name'' a name for your chest (; )
4. Power the command block with something like a button or redstone ,a lever ,pressure plate.
And done c;
Tip : The command adds a minecart with chest in the block. Remove the wall and you see a bit of the minecart .
For more instructions :
https://www.youtube.com/watch?v=Aq-9kyVNNHk