Do they *usually* get along? Sure, they're usually quite happy to have a friend to play with. Do they *always* get along? Definitely not! They may fight and try to decide who the dominant pig will be... after which they may decide to agree, or they may continue fighting. Same with male-male.
If they continue to fight, then they need to be separated. This doesn't necessarily mean two separate cages - often just putting more grids down the middle of the existing cage will be enough. I've had to do this before, and it works well - they can still have another guinea pig to talk to, but they won't hurt each other if one of them gets in the other's way.