When we enter through the door it's an emergency door. Right? But if we enter through the emergency door then how come when we open it for the air bridge the slide doesn't inflate?
Take a look at the evacuation slide wiki page for full details.
As a part of the preparations for takeoff the flight attendants will arm the doors. This usually means moving a lever on the door.
If the door is armed when it is opened the slide deploys. If it's unarmed it doesn't.