BF shouldn't be painful all the way through a feed. You do however get an initial pain which lasts a few seconds as you start feeding due to the 'let down' reflex.
If you're having pain that lasts longer than a few seconds, take him off your breast by putting your little finger into the corner of his mouth to break the latch, and reposition him.
You need to hold him close to you in a straight line, with his nose towards your nipple, and he needs a nice wide mouth so that your nipple is at the back of his mouth on the soft pallet. He also needs to be able to move his head, so that he can move it back when he's finished.
If he's latched on correctly after the initial latch on pain, you shouldn't have any pain and he should have nice full cheeks, his bottom lip should be turned outwards and he will change the pattern of how he sucks (slow, faster etc).
Signs of poor attachment are lots of tutting sucking noises, painful nipples, and squashed nipples after feeding. Baby will also be unsettled and may want feeding more often.
In the first few weeks, it's feed feed feed. This is natures way of building your supply up, this is normal. Remember his tummy is tiny.
If you want to top him up, please be aware this can mess with your supply, as if he was BF he would be helping your body to produce more milk.
Formula is also harder for a baby to digest, this is why some babies that are FF sleep longer..... BM is easier for a baby to digest so this is one of the reasons BF babies feed more regularly.
Google breastfeeding positions and have a look at a few videos. Also AAsk your MW to check your latch and positioning and ask what BF support is in your area, it's also good to chat to other mums at places like baby cafes ect
www.nhs.uk/Conditions/pregnancy-and-baby/pages/breastfeeding-positioning-attachment.aspx