This is probably the simplest cannon possible in minecraft.
It can be made in a variety of shapes and sizes. There is just a basic working principle. You just need obsidian, tnt and flint and steel.
Step 1: Location
find a quiet place with a small cliff.
It will be better for our cannon.
Step 2: Structure
Place two obsidian blocks on the ground. The cannon will fire in lengthwise direction. Remember to use obsidian. If you use any other blocks then the cannon will also blow up each time you fire.
Step 3: Ammunition
Place two blocks of tnt on the obsidian blocks.
Step 4: Firing
use flint and steel to ignite the rear tnt and after 2 to 3 seconds ignite the front tnt. The rear tnt acts as propellant and front tnt works as projectile. The cannon fires in front direction. The picture shows how much damage each shot can do. It can shoot upto 25 blocks.
Step 5: Reloading
Again add two blocks of tnt and repeat the procedure.