I assume since you already know what is in your way, that you don't have any plumbing or electrical to deal with. That's good. One piece of information you don't give however is whether the wall is a bearing wall or not. What that means, is if the wall bears any of the load from a second floor and/or roof, it needs to be treated differently.
Let's assume that it is not a bearing wall for the moment. In this case, you can cut through the studs and "head it off". What that means, is basically just adding a framing member across the top and bottom to create the opening for the medicine cabinet to sit in. This should be checked to make sure it is plumb and level.
If the wall is bearing, you will need to replace the support formerly provided by the studs you will be cutting. This is done by fastening "king studs" (studs that go all the way up) to the "jack studs" which you create by cutting them and adding the header.
A word of caution, if you are not sure if the wall is bearing, you should either treat it as if it is or get someone to come and look at it who would be able to direct you properly.