In the sense “know one’s way around”, it is construed with any preposition that refers to a place, e.g. in einer Stadt(“in a town”), auf einer Insel(“on an island”), etc.
In the sense “know a lot”, it is generally construed with mit. In some cases, e.g. when the object is a professional or scientific field, in is also possible. Thus, for example, er kennt sich mit der Werbebranche aus, or er kennt sich in der Werbebranche aus(“he knows a lot about the advertising industry”).