The technique is a big part of that. Holding the strings almost flat instead of at certain angles is a big part. It just takes time. Your fingers have to develop that callus over time. I recommend a nylon guitar or classical because it's much easier on the hand, especially when you're starting out. Also, hold the guitar neck gently. There's not a lot of pressure that has to be applied.