This can actually become a fairly complex system. To start experimenting: What I've found to be useful is setting up a sprite that has the scroll-to behavior and having a numeric variable on it that I can adjust at will.
So for instance, if the camera state is 1, it sets position to player.imagepointx(your imagepoint here)/player.imagepointy(your imagepoint here) every tick.
You could have other sprites in the game that can be set to invisible that, when colliding/overlapping the player, can change the numeric value of that camera sprite's variable (let's say, to 2) and have that sprite set it's position to another x/y location or object location.
I would also recommend reading up on lerp and using that to lerp from one position to the other so that you can get a smooth transition from point A to point B.