How do i make my camera/character not clip though walls?

I think my camera is placed outside the bounds since i change it from third person to first but how do i make sure its place inside if it is that?