This is essentially a legal question, relating to when binding legal relations exist between an employer and a prospective employee. If you would like to understand this well, you should have a look into the basics of contract law, particularly in the context of workplace law. Contract law generally recognises a legally-binding contract to exist once there has been an offer and acceptance, even if this has not yet been formalised in a written "contract". So as a general rule, if they have verbally offered you a position and you have said yes, that is a legally binding contract.** Often the communication of an offer/acceptance is done by email, in which case there is also documented evidence of offer/acceptance. The purpose of a formal document is to set out the relevant terms of employment, and to act as evidence of the agreement and its terms.
So, your general position that it is "official" once there is an offer and acceptance is correct. The only potentially naive part about this is to consider whether you have evidence of the offer/agreement, whether the other party will be honest about this in the event of a dispute, and whether the terms of the agreement are sufficiently specified to avoid too much wriggle-room on the other end. If there is a dispute over the agreement, and it was purely verbal, are they going to admit that an offer was made? Will they characterise it accurately? Will they assert that it was conditional on anything? Can you prove your asserted position? For that reason, when I am dealing with these things, I will generally ask them to send me an email with their offer and I will email back with acceptance; that is enough to ensure that there is a binding agreement that I can prove.
You should also bear in mind that some offer of employment come subject to various conditions (e.g., background checks, probationary period, etc.) and their verbal/email offer might refer generally to conditions that are not yet fully specified until you see the formal "contract". For this reason, it is generally a good idea to wait until you see this formal document, to ensure that you are in agreement with them about any required conditions, etc., for your employment. If you are unsure of the legal status of your agreement, contact an employment lawyer and they can assist you.
** Even before this, if the employer has led you to believe you have a position with them, and then you don't get it, they can sometimes be liable for misleading or deceptive conduct.