Several ways. If you have a wound that is deep, down to a bone or joint, it can introduce the fungus. If you develop a fungal infect near a bone or joint, it can spread directly. If you have a fungal infection in one part of the body, the fungus can get in the blood stream and settle in a bone or joint.
Nearness & blood. Unless there is history of an open wound close to the area( continuity) that could be contaminated most likely the infection travel through the vessels or blood stream( arteries, veins, lymphatic system) from the original infection( skin). Maybe associated to low immune system ( pt with cancers, on cortisone, diabetics or low immunoglobulines, hiv.