There are two ways, and both need an internet connection even though you end up playing locally.
Go to Multiplayer, choose Play, then Combat Training. You can set the number of bots before starting, which makes this the quickest route by a wide margin.
On Xbox 360 and PS3, update the game to the latest version, then head to Multiplayer, Local, Split Screen, and pick Team Deathmatch or Free-for-All. Open Edit Game Options and change the enemies setting from Disabled to the number you want.
Bots only appear in Team Deathmatch and Free-for-All. Capture the Flag and the objective modes are off the table. On PC you can force other modes through console commands, but the bots ignore the objective entirely — in Domination they will not go near the bomb.