To fire a cannon, first pivot to face the target following the normal rules for war machines. Then, nominate a model or building within the cannon's line of sight, outside of its minimum range and within its maximum range.
When you have chosen your target, place a small marker over your target in the correct position as a reminder of where the shot is intended to land. Note that you are not allowed to place the marker over friendly models, or enemy models from a unit that is engaged in combat, as the crew refuse to deliberately target their allies (although the shot might well go wide and hit friends by mistake as we'll discover later).