The biggest distinction between items that can be taken into the cabin and what must go into the hold is if an item is considered liquid or not. Objects that are liquid are generally not allowed in hand luggage. There are exceptions to this, but first, we need to define what a liquid is.
To quote the Transportation Security Administration, or TSA of the USA – A liquid is ‘Any product that can be pumped, squeezed, spread, smear, spray or spill’. That means, for example, shaving cream is a liquid, as it can be spread and smeared. Shaving soap however, while similar, is not a liquid. Any type of spray deodorant, even alcohol-free ones, are liquids. So are roll-on deodorants, stick deodorants meanwhile, are not. Toothpaste, and other gel-like substances, count as liquids, while floss is likely not.