Okay, lets make this easy.
First of all, find the longest chain of carbons. That will give you your root. Secondly, you need to see what groups are attached to that chain. Lets say we have a methyl group attached at the #2 carbon of a 5 carbon chain. Don't forget, the chain is numbered by having the attached groups occupy the lowest. If its on the 2nd carbon of a 5 carbon chain, it could be #2 or #4, we always go for the #2.
So, this would be named 2-methylpentane
IUPAC
Lets say we have 3 methyl groups, 2 on the #2 carbon and 1 on the #4 carbon. This compound would be called 2,2,4 trimethylpentane.
Of course, then we add in double and triple bonds. The ending of the main root name just changes. Say again we have a 5 carbon compound with a methyl group on #2, but a double bond between carbons 2 and 3.
We would call this
2-methyl,3-pentene
Mossjoh