This game is based on a points system, so the way to rank up is to earn as many points as you can. If you haven't prestiged yet, the best ways to this are:
-Play the objective; hope on flags, take hard points, pick up tags, etc.
-Get kills; if you earn kills while on the flag on domination or you kill someone off of the flags, you get extra points
-Run engineer with 2 emp grenades and destroy everything you see. All sentry guns/guardians and other equipment. You earn 125 points for scorestreaks + 50 points for all equipment you destroy + 50 points for every EMP assist kill you get, so on maps like nuketown, EMPs are OP for building points.
-Run the FHJ launcher and shoot everything down. 150 points for scorestreaks, 100 points for CUAVs, 75 for UAV.
-Stay in the game until the end, no matter how the team does because you are rewarded XP bonuses, so those add up fast.
-Prestige your weapons. I believe for one SMG, all of the attachment unlocks earn you ~20K XP points alone (no including the kills needed to earn them), so, if you prestige that weapon twice, thats ~40K XP you earn for just attachments on one weapon. Do that for all weapons and you'll earn a ton of XP. Again, not including the kills needed to get those.
After you prestige, go to you Challenges in Barracks and complete those:
-Do the optic challenges for the Reflex, Acog, and Hybrid Optic. They're very easy to complete and still reward you nicely.
-Do the Perk Challenges and the WIldcard Challenges.
-Do the Equipment Challenges as well.
-If you stack the challenges together, you can earn them much faster and rank-up the lower prestiges super fast, but wont have anything to do in later prestiges. Or you can space them out per prestige so you aren't ranking up as fast for lower prestiges, but at more steady pace. Up to you.
-Check the game mode challenges and complete those as well.
Hope this helps.
I was out of COD for 2 years as lived somewhere with an unspeakable internet connection so it was pointless.. Came back in march and got BO2 and was getting slaughtered KD was down to .79 etc etc... With a LOT of playing am positive again so I know where you are.. All I can say is a combination of the above posts but first and foremost map knowledge and practice really....
Also playing through all the weapons at first I was just playing (once unlocked) the scorpion and an94 as I like them both depending on the map but then I got into making my guns golden then diamond so did the SMG's and AR's and thats worth a good few points plus as you play through them you earn extra points all the time not just for camos but the attachments..
Good luck mate and keep at it!