Usually the bulb socket complete is in a softish rubber anti-vibration rubber casing with sort-of teeth molded in, it should pull right out of the housing. Just disconnect any ground wire and try working the whole assembly out. Pouring warm/hot water on it will help loosen and lubricate it.
The brown bit with the two blob contacts and wires is keyed against rotation, for the tail light dual filament bulb. It may not come out easily like the single contact type.