In terms of PVP:
Both lock and mage are targeted by melee classes most of the time due to their lack of armor and to the fact that they have massive damage and great cc.
Frost Mage plays great in arenas when facing melee classes due that you can counter them with a lot of slow skills, nova, pet nova and these give you the benefit to kite around but the damage must be built up in order to do a a good burst and very well timed.
Fire Mage plays great in arenas when you want to nuke down a class (any class) in a matter of seconds. Additionally it has all 3 magical schools (arcane, frost, fire) and this makes fire mages the best CC mage out there in BFA. Arcane(Sheep), Frost(Ring of Frost), Fire (Dragon's Breath).
Affliction warlock must be played with either a resto druid/resto shaman or rogue/warlock, elemental/warlock. Having dots on everytarget is a common thing warlocks are doing in order to do cleave damage and high amount of heal from damage. They are quite tanky and have a bit more survivability then mages if you play it correctly with gate + teleport. Also Warlocks>Mages in PvP if played right
In terms of PVE:
Frost mage perform quite well in Raids and especially in Mythic+ due to their high aoe damage Frozen Orb+Blizzard+Comet Storm.
Fire mages perform great in Raids and Mythic+ with Fortified. They have high burst damage while combustion is up and can clear single target mobs faster then Frost.
Arcane performs good in raids and mythic+ but it requires a lot of gear in order to do that massive damage. Arcane should be played in Zek'Voz fight especially on Mythic to eliminate the adds because they have high damage while Arcane Power is up with 4 stacks of Arcane Charges.
Affliction warlocks are not that great in mythic+ because they must ramp-up damage with their dots and Seed of Corruptionbut they could perform good on Fortified bosses because they have higher hp and this would allow. I recommend to play destro on Tyrannical Mythic+ for high cleave damage over short periods of time.
Affliction warlocks are great and a must for some bosses in raid like (G'hunn) for their utility for the Orb Mechanic but also they can do a lot of damage on bosses while having the dots up and running all the time.
Also check www.wowhead.com for more information of these classes and how they perform in raids/dungeons/arenas/bg.