Step 12 of 18 of the SMILES tutorial. Inside square brackets you control everything about an atom, in a fixed order: isotope, symbol, chirality, hydrogen count, formal charge, atom class. C[N+](C)(C)C is the tetramethylammonium cation, and the + is what makes four bonds on nitrogen legal. Write [O-] for an anionic oxygen, [Fe+2] for a dication, [NH4+] for ammonium. Beware the trade-off: a bracketed atom has no implicit hydrogens at all, so you must spell its hydrogens out yourself.
It opens on C[N+](C)(C)C, which you can edit in place: the structure follows every keystroke, and so does the notation when you draw instead.
Convert between chemical structures and SMILES in both directions, search a list of structures by substructure or SMARTS, and learn the notation step by step. Everything runs in your browser — no structure you open ever leaves your machine — so the tool needs JavaScript.