Frictional force (F) = Coefficient of friction (μ) x Force normal to the plane of contact (N). μ depends on the materials, and takes values between 0 and 1.
Works well for situations where the conditions at the point of contact don't cause any local change in the nature of the contacting surfaces - eg. lubricated surfaces, where the film of lubricant keeps them apart so there is no actual contact, or hard metals, where the stiffness of the material is such that there is no significant deformation in response to the contact pressure. Steel wheels on steel rails are pretty close to this "ideal" condition.
Works really badly for surfaces which deform under pressure, which heat up and significantly change their properties at the contact point, which chemically bond with each other instead of merely undergoing proximity-based Van der Waals type interactions - like rubber tyres on the road, which do all these things, hence motorcycles being able to achieve lean angles greater than 45 degrees which should be impossible if μ<1, and cars getting more grip in the dry (but not when lubricated, in the wet) from having wider tyres with a larger contact area, when it shouldn't make any difference because there is no pressure term, only force.
The notion that the small contact patch makes trains more liable to skid arises from applying expectations based on situations commonly experienced directly via the senses - in which all wheels have rubber tyres - to a situation which looks similar at first glance but in fact is not because of the very different materials involved. There is further confusion from everyday experience being a conglomeration of factors many of which are not relevant at all, such as humans finding it more difficult to balance on a small area than a large one, so it is a natural reaction to regard a small contact patch as "insecure", even when the human sense of balance is not involved.
If anything trains are more liable to skid because the contact patch is too large. A much smaller contact patch giving a much higher contact pressure that caused significant deformation at the contact point would move things out of the "ideal" region and make it behave as if μ was larger than it really is. It would also be better able to disrupt the lubricant film. But it would also cause a whole lot of problems, rolling contact fatigue up the wazoo for a start, which is among the reasons that rails are not made from a harder form of steel than they are.