In my experience I have found that almost all switches do actually work together. If your simply using the uplink to cascade different switches, you shouldn't bump into any problems.
If on the other hand your trying to get more specialised functions working, e.g VPN trucking, then your most probably bound to stumble across problems, especially if one of the switches are Cisco. Again, these problems can be rectified, its just a matter of spending the time to figure out which settings will ensure compatibility.
As far as routers concern, it depends on what your trying to do. Simply Point-to-Point connections over e.g ISDN should work. Depending on your WAN protocol, you need to also make sure your frame encapsulation is correct and the same for both sides, otherwise you will have problems.
If your question still hasn't been answered, you might consider giving specific examples which you have come across in order to help us provide you with a better explanation.
Lastly, Cisco powers to majority of networks around the world and certainly dominates the market place. Their products are good ones with good functionality, which is paid at a premium price!
Cisco equipment are also build and designed in a way that a novice can't just setup, as they require specific knowledge and skills, which is something hard to find these days. This also explains why people to know how to setup Cisco equipment are considered much more knowledgeable than your standard IT person, but in practice it might not be the case.
To add to what Chris has said, you really need to know what it is you are doing or are attempting to do, to determine if you can combine any device.
For example, if you want to use VLANs, and one your switches doesn't support it - there will be no VLAN (on the unsupported switch - has nothing to do with Cisco).
For routers - what routing protocol are you using. If you want to mix and match Cisco routers - you cannot use EIGRP, as that is Cisco only. But other protocols work fine.
I have heard this about other devices where it has been said that brand x device cannot work with brand y, only to find that one of the devices just doesn't support the feature that was being attempted.
On a personal note I don't see anything wrong with being locked in to Cisco I just love that company..
with ref to your question, their very very extensive knowledgebase at
will probably solve any compatibility problem.