I respectfully disagree with @lemming Colors that are opposite each other on the color wheel are called complementary colors. This type of color theory is taught in basic art classes and is used by interior designers everywhere. Complementary colors look wonderful together, especially when you are trying to create a contrast. For example Yellow and Purple or Orange and Blue or Red and Green.
This site explains the color wheel a little bit better and what primary, secondary, tertiary and complementary colors are.
Colors that are next to each other on the color wheel can look very nice too such as Blue and Green or Red and Orange or Yellow and Orange or Purple and Red
And most colors look good with either black or white next to them.
Generally colors will go well with each other if they are in the same temperature range (meaning warm or cold) if you put a warm color next to a cold color that is when things will start to look odd. Like this or this This is especially important to remember if you are pairing a color with a gray tone. A warm gray tone is a completely different look than a cool gray tone. This is true for any color, like if you want to pair 2 reds or 2 blues, make sure that they are in the same color temperature range (even if one is light and one is dark, or even if both colors are light or both colors are darker). Here is one excruciatingly bad example of how NOT to pair colors due to the mixing and matching of temperatures.
The best way to check to see if your colors go good together is to get a color sample book from a paint store and just start putting colors together. If you need more help, the paint stores will often have palettes of colors on a sheet that are pretty much guaranteed to work together. And you can ask the folks at the paint store their opinion. And if you think you have one color in mind that you like, try to find it somewhere in nature or in a magazine where it is being used with another color. Home interior magazines are really good for finding color combos that you like that also go good together.
And you can give an example of a color or a combo that you are thinking about and put it on Fluther and we can have a look at them.