Actually, the ketch / yawl distinction is somewhat different from that, @janbb.
It’s the placement of the mizzen mast (the rear mast) in relation to the tiller or wheel that determines whether it’s a ketch or yawl. If the mizzen mast is forward of the wheel or tiller (whatever is used to steer the boat), then it’s a ketch. If the mizzen mast is aft of the steering station, then it’s a yawl. At least, that’s how it goes with sloop-rigged boats. I don’t know schooners as well as sloops.
Schooners are generally gaff-rigged. What that means is that they have a spar at the top of the main sails, making them a sort of skewed trapezoidal shape (not triangular) when raised. They may also fly topsails above the mains (as in your drawing, where sails 3 & 5 are topsails). Those would generally be flown only in fair weather with relatively light winds.
Both schooners and sloops are fore-and-aft rigged, meaning that the sails are generally raised and rigged along the centerline of the boat. (Spinnakers, the balloon-shaped and often very colorful light sails flown at the bow of some boats while on broad reaches or runs, are an exception to that rule. Although the sail is still raised to a point at the top of the mast, which is also along the boat’s centerline, the sail itself is designed to be more or less athwart the beam.)
There aren’t a lot of square-rigged ships (or boats) these days, because in general the old-fashioned rig from centuries ago is so labor-intensive that no one can afford to hire the crew for a working ship, and pleasure boat owners prefer somewhat more privacy than a huge crew affords. There is a remarkable and beautiful exception to that rule, though, in the ultra-modern, ultra-sleek and ultra-high tech Maltese Falcon. Many national navies, coast guards and merchant marine colleges do own, maintain and operate square-rigged ships as training vessels for their students and cadets. The US Coast Guard barque Eagle is one such.
In general, I think the dividing line between “ship” and “boat” often depends upon purpose. Working vessels are more apt to be “ships”. Pleasure vessels of whatever size are generally going to be considered “boats”. The US Navy until recently always called submarines “boats”. Hence, Groton, Connecticut’s “Electric Boat Company”, where many of them originate.