Step 5 of 18 of the SMILES tutorial. To make a ring, put the same digit on the two atoms that must be bonded. In C1CCCCC1 the first and the last carbon both carry the ring bond number 1, so a ring closure bond joins them into cyclohexane. The digit is only a label — it says nothing about the ring size, which you get by counting the atoms between the two labels. Change one C into O and you get an ether ring: C1CCCCO1 is tetrahydropyran, and taking one carbon out as well gives the five-membered C1CCOC1, tetrahydrofuran.
It opens on C1CCCCC1, 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.