I hit my leg on a metal bar, now I have a sore and two swollen bumps, and it hurts but I can walk?

Cold then Warm. It seems that you have damaged some tissues that are a bit deeper under the skin as well as a surface wound. Keep the wound clean. For the first 24 hours apply cold to the swollen area. After 24 hours apply heat to hasten the removal of the trapped tissue fluid and/or blood. If the area doesn't improve over the next few days have it examined.