1. The attractive forces between the liquid molecules. Viscosity increases with increasing attractive forces.
  2. Structural features which can cause entanglement. Increasing entanglement increases viscosity.
  3. The temperature of the system. Viscosity increases with increasing temperature.


Item 3 ties in with item 1 if you thing about it.
Item 2 is important because a polymer consisting of a long chain many carbons bonded together (sometimes organic chemists draw structures but don't bother to show hydrogens)

C-C-C-C-C-C-C-C-C-C-...-C-C-C-C-C-C-C-C-C-C

and surrounded by hydrogens

CH3-CH2-CH2-CH2-CH2-...CH2-CH2-CH2-CH2-CH2-CH3

will have a viscosity that increases, the longer you make the chain. It is thereby possible for an engineer to have some idea of the molecular weight (how long the chain is) by doing a viscosity test.
It should make sense from the octet rule and formal charge that end carbons on a hydrocarbon chain can bond to one carbon an three hydrogens, and carbons not on the end can bond to two carbons and two hydrogens.