It's still being debated (for what that's worth) but there are numerous studies that indicate that they do [1].
I don't think we have any workable theory at this point that would explain how exactly (biological) neural networks produce pain, or predict how complex they need to be to do so.