In order to cancel the production of a building you first need to enter it buy tabbing on it. You will then see, which production is currently active and how long it will still run.
Supply Building:
Enter the building and hit the red Cancel-Button in order to cancel the production. You will need to confirm this once and the prodction is canceled.
Goods Building:
Enter the building and hit the red Cancel-Button in order to cancel the production. You will need to confirm this once and the prodction is canceled.
Military Buildings:
Enter the building and hit the red X-Button in order to cancel the production. You will need to confirm this once and the prodction is canceled.