You should only sit your child on the potty for about 20 minutes at most.
If the child still refuses to use the toilet then just wait it out. Your child will potty train when they're actually ready to when they're ready.
If your child is getting near 5 years old and not potty training then I would say push it but any younger I would just give it time.
Never force your child to use the potty or punish them as that will make them resist potty training even more.