At first you need to identify, if there are any well know functional groups.
If there are any, then they will be used to create the final name, and this is done according with the rules of IUPAC nomenclature.
In your first example.
There is a benzene ring, which is a very common structure in organic chemistry. There are other more complex derivatives of it too, for this example or similar looking molecules the name would refer to either benzene or phenol functional group, this is a little nuanced.
So, in this case we know it is a benzene we also know, there are 3 methanes attached to it or more specifically methane derived groups called methyl groups.(Methane is alkane and a functional group of alkanes is called an alk(-yl) group).
3 methane groups = trimethyl
The last thing is to say where they are attached. This can be found by counting around C atoms on the ring 1, 2 and 3. Ring has no beginning and no end so the starting point is arbitrary, by convention the first group has number 1 and the rest follows.
The second molecule.
Here, the idea is to pick the back bone of the molecule and then attach to it smaller and smaller parts like a tree with its branches.
So the trunk of the tree would be 5 C atoms so pentane.
Here the functional groups attached is also methyl group on 3th atom of the backbone pentane, so that would give 3-methylpentane
there is still a double bond that has to be included in the name which changes pentane to pentene, and lastly its nice to say where is it exactly therefore pen-2-ene
Putting it all together gives us,