Dogs were bred from wolves, and still have pack mentality. They have body language to comunicate, such as tail wagging or rolling on their belly to show submission, and tend to congregate if they were raised in an evironment where they learned how to behave around other dogs.
Cats were bred from wild ancestors that led solitary lives, generally joining up only to mate or fight for territory (often why outdoor tom cats return torn up, as mine did one time).
This doesn't mean cats or dogs are always social/antisocial. The environment they were raised in often leads to different levels of sociality.