Usually, if you are inside a prison (for example a warden), or need to distinguish between different types of people inside a prison, you would call people who are imprisoned - inmates. However, for regular people, these two words can be used interchangeably.