This type of enemy is called a Large Body. The weak spots for these Heartless are their backs, where they take increased damage. You need to maneuver yourself around them and hit them from behind, though you can also jump up and hit their heads as well. Basically, you want to stay mobile when you fight them, especially because of their charge attack, which can knock you backwards and do a decent bit of damage.
As you've seen, they can also take damage when you hit them from the front, but it takes much longer to kill them. Dodging when they charge is helpful because there is a short moment where they pause afterwards, which gives you the chance to smack them about a bit.