Yes, they have the same meanings, and they are just likely to appear in different contexts. For example, alter often appears with physical objects, while revise applies mostly to ideas and writings.
Learning the differences between synonyms is mostly a matter of experience. Use Google search to find lots of example c