The ATMega328 does not directly do USB to TTL conversion, unless it has been programmed to bit bash the USB data lines, and has firmware support for the USB protocol. There are some commercial programmers that use this principle.
Most programmers use a USB to serial protocol chip, these are commonly made by FTDI and Silicon Labs, as well as a few Chinese companies. There are some programmers that do use processors that have USB support, the data lines go directly to the processor, but they still require code supporting the protocol, it depends on how much hardware support is on chip.Programmers with USB to serial TTL are very common, and very cheap. They are often open source, you can build them yourself, and the code is available. However, in your case, you appear to be starting from scratch, so it is simplest to purchase one, they are typically around US$15.My guess is that you need to look at the commonly available cheap commercial programmers, and check what software support is available for it, either standalone, or in your IDE.
Cheers,Richard