Many new mothers expect that breastfeeding will go smoothly from the moment baby first latches on. And for some women this is true. For the majority of new mothers and babies there is a learning curve that takes from 4-6 weeks. ( think how long it would take you to learn to ride a unicycle, or juggle, or learn a new skill).
This is a useful webpage that lists some fo what you can expect in the early weeks of breastfeeding and how to set yourself up for success: practice, practice, practice, practice, a good support system, and knowing when to ask for help.