i think it’s a question of what you want the game to behave like. in order from least to most processor work:
1, like princec suggested, you can have cues inside your level to create an enemy when the screen’s border touches this or that location. the result is like mega man: the enemies will vanish and die when they leave the screen, or they can mysteriously reappear when you run back toward where you killed them before.
2, like harley suggested, you can create all the enemies and only update them when they’re onscreen. the result is that if you outrun an enemy that’s chasing you, he won’t keep chasing you once he’s outside the screen, yet if you step back he’ll be right there as though nothing had happened.
to make the cons of the above two methods less problematic, you can use a shape focused around your character that is larger than the screen. basically this allows the enemies to drift off the screen a little ways and then come back on. i think double dragon did this.
you could also try keeping enemies awake for a limited time after they had left the screen, and then ceasing updates if the time elapsed before they returned. in a game like sonic the hedgehog, where the character can travel many screens in a second, this method is faulty.
3, you can keep a list of all the enemies that have been on the screen, and update those. as such, once an enemy is ‘awake’, he’s awake for good, but he won’t wake up until your character gets close.
4, you can work your AI as a state machine, and have all or most of your enemies start out in their ‘idle’ state. idle in this case would mean doing squat, such that updating them would execute practically no code. then, when the player saw them, the enemy would wake up (change to an aggressive state). you might want the idle state to even do a quick line-of-sight scan for the player, such that enemies a few screens off might see him, wake up, and come running.
the above two methods become worse and worse ideas as you increase the number of enemies in your level, but i’ve used this method and had a few hundred objects being updated with simple physics (maybe 20 lines of java executed for each) plus several with in-depth physics, and seen no slowdown at all.