Pull out your hammer (default 2 key for PCs) and whack your turret a few times. A progress circle should show up on your HUD around the turret icon and after 5 strikes on a fully built level 1 turret, it will be upgraded to level 2.
Be aware that any hammer strikes on the turret while it is damaged will repair the turret and not upgrade it.
Additionally, level 2 turrets automatically upgrade to level 3 while Molten Core is active. Placing a new turret during Molten Core will not upgrade it instantly to level 3, but once you hit it enough times to upgrade to level 2, it will turn to level 3 for the remainder of Molten Core.