Getting shot isn't a problem in itself... as long as you've taken out some of the other team, or provided a distraction / holdup.
When shooting frrom cover, try not to pop out of the same place every time, or they'll zero you in, and hit you next time you pop out.
When hiding, keep your mask down and stay still. Keep your marker out of sight if it's bright - it's very easy to see a mask or marker moving about in a bush!