Have you noticed if you have played in creative mode, and you are in the chat. There will be 3 buttons on the side. If you click or tap on the button with the / on it, it will show you options. If you click weather and click thunderstorm, it will start you rain and lightning will strike and so on. But if you want to get more interesting commands you will need a command block. To get a command you have to right "/give @p command_block" in chat. (Without the ") You will receive a command block.