Heaving to is a very useful technique, especially on a cruising boat. As noted above, it can be used for several purposes. I've used it several times on different boats in the Caribbean when, having run my distance in overnight sails and approaching a darkened island, I'd heave to on the offshore tack to await daylight.
I did this several times in the era before GPS, and once with GPS aboard where there were some chart discrepancies and we didn't want to take any chances in very stormy weather.
For many boats, heaving to is a very simple procedure: just harden up to a beat or close reach, then come about but don't touch your jib sheet. This will leave the jib sheeted to the now windward side, it will blanket the main somewhat, and if you turn your wheel or tiller so that the rudder is slightly to windward the boat will quickly assume a very quiet and comfortable condition.
All boats behave a bit differently, so you need to experiment in various conditions, under full sail, under reefed sails, etc.
The ability to heave to confidently is a wonderful thing. You can actually stop the boat -- for all practical purposes -- and rest or cook or wait or whatever, all in relative comfort.