He defies the law of gravity clinging to upright walls, his fingers and toes have microscopic hairs that add a large amount of friction to his ands and feet. This allows him to cling to and climb up vertical buildings.
When Spider-man slings his web and it attaches somewhere it creates tension when he begins to swing on it. His body weight pulls down in the web as he is slung across the city.