Why mosquito bite is confined to a certain shape?
What you're referring to as a mosquito bite is actually the "wheal" (red swollen bump in the skin) that forms from an immune system reaction to antigens (foreign molecules) in the saliva of the mosquito that it leaves behind inside the bite.  It's not technically a toxin, just something that causes an immune reaction.  

It's also not an infection, it's inflammation.  Infection might set in if the skin is scratched open and bacteria move in.

The reason it's red is that immune cells release cytokines (like histamine and that cause cause edema that leads to swelling, heat, itching, etc - and recruit other cells to do the same.

The cytokines that act locally have a range of effect, especially histamine.  The degree of immune reaction determines the size of the wheal and how long it lasts.  Scratching it contributes to irritation and can prolong resolution.  Scratching it open can lead to infection.