Most likely the 'level up' you're seeing is that the weapon is of Strange Quality. Strange weapons and items will:
- Strange weapons track kills or other various events, (such as kill assists or earned points), and record them as an attribute of the item.
- Strange items arebe awarded 'ranks' as the recorded count increases, with the rank affixed to the beginning of the item's name.
Each time the player achieves a new rank, it is announced to all players on the server with a message in the chat box; A notification pop-up also appears only for the player the strange item belongs to.
- TF2 Wiki
Strange is one of many 'Qualities' that a weapon can have - all of which are purely cosmetic - 'levelling up' a Strange quality weapon does not make that weapon better, it's purely flavour.
The qualities that items (not just weapons) can have are:
- Normal - The stock weapons each class starts with
- Unique - Unlocked from Achievements, Trading, Random Drops and bought from the TF2 Store
- Vintage - Most commonly, these are items that were Unique, but created before Valve released the 'Mann-conomy' update and made crafting easier.
- Genuine - Items obtained through cross-game promotions (i.e. purchasing another game whilst it offers TF2 items as a bonus). These are mostly cosmetics but also some weapons.
- Strange - Tracks Kills/points. See above.
- Unusual - Items that have unique particle effects when worn. (Until now, mostly cosmetics and new also weapons)
- Haunted - Items released for Halloween updates, which can (generally) only be used/seen on Halloween/Full Moons)
- Collector's - Weapons that were crafted after collecting 200 unique versions of that weapon (along with the 'Chemistry Set' item that creates the 'collector's' weapon)
- Decorated - Uniquely skinned items with rarity-based colours, obtained from completing contracts introduced in the Gunmettle Update (or from unlocking them from Weapons cases)
- Community - Hand-given by Valve to users who have contributed to the TF2 Community - these weapons have a unique particle effect.
- Self-Made - Given by Valve to the weapon creators who submitted the weapon idea on the Steam Workshop
- Valve - You're playing with/against a Valve employee. Ask about Half Life 3 :P.