The majority of items in Team Fortress 2 have levels associated with them. Levels, viewed with the item name in the loadout menu, are purely cosmetic and do not modify the effectiveness of any weapon or item.
Originally, when the item drop system was first implemented in the Sniper vs. Spy Update, item levels were added by the developers to test if level functionality could be included. Dropped items were given a random level between 0 and 100, and the level would appear under the name of the item, visible to all players.
Random leveling is no longer a feature as of the May 29, 2009 Patch. All new items receive a standard level. However, hats will still receive random levels between 0 and 100 and this was later amended to levels 1 through 100 some time after the Classless Update. All existing items retained their levels. The ability to view levels in the in-game backpack for hats and misc items has since returned as of the August 18, 2011 Patch.
The Dueling Badges and Mann vs. Machine Badges are the only items to change level. The Dueling Badge's level increases by 1 for every 10 duels won by the player, changing into the next tier of badge at levels 25, 50, and 75. MvM Badges level up each time the player completes a Tour of Duty.
Botkiller weapons are assigned a level equal to the tour number that is completed when they are obtained.