Hot-wire anemometry readings where the sensor is close to a solid wall become erroneous due to additional heat losses to the wall. Here we examine this effect by means of experiments and numerical simulations. Measurements in both quiescent air as well as laminar and turbulent boundary layers confirmed the influences of parameters such as wall conductivity, overheat ratio and probe dimensions on the hot-wire output voltage. Compared to previous studies, the focus lies not only on the streamwise mean velocity, but also on its fluctuations. The accompanying two-dimensional steady numerical simulation allowed a qualitative discussion of the problem and furthermore mapped the temperature field around the wire for different wall materials. Based on these experimental and numerical results, a theoretical model of the heat transfer from a heated wire close to a solid wall is proposed that accounts for the contributions from both convection and conduction.