I think the answer to this one, like so many things, is... Yes and No.
It affects some people a little, and some people a lot, and some seemingly not at all. Some people are more impressionable than others; some are more prone to try to live out their fantasy in real life than others. Some shows have more impact than others on the mind. Also it depends on how much of it you watch, and how much you dwell on it, and how realistic your world view is.
Not just violence, and not just sexuality... other things too. Like advertising and consumerism, and also political opinions and social viewpoints. To a large degree, TV has replaced Main Street as where you go to see what other people are doing, wearing, saying and thinking. The problem is that TV is mostly fiction.
Well, over the past decade or so actually the Internet is replacing TV as the new Main Street Anytown USA. That has its own problems, but at least there are real people involved... but often they don't act on the Net like they act IRL.
So it kinda depends on many things. I watched a lot of cowboy movies and war movies and sci-fi growing up, but it didn't cause me to go out and shoot down my worst enemy in High School... because I was also socialized in other ways and taught morals, religion and ethics... and how to count the consequences of my actions in real life.
I had a niece who grew up on a steady diet of slasher flicks and other gore-fest horror from a VERY early age... some of us were VERY worried that it would warp her little mind... well maybe it did, she grew up to be a hippie pacifist.
The effects vary. For some it can be a safe outlet for their feelings, for others it stokes the fires of desire to do things they shouldn't do.