Can I train my cat familiar to be a rogue? If I can, how does it level up and would it be able to wield weapons?
Stock familiars can't attack, rules as written:
Your familiar acts independently of you, but it always obeys your commands. In combat, it rolls its own initiative and acts on its own turn A familiar can't attack, but it can take other actions as normal. (PHB 240)
The Warlock's Pact of Chain familiar can attack, at the cost of the player's action:
Additionally, when you take the Attack action, you can forgo one of your own attacks to allow your familiar to make one attack of its own.
Using Find Familiar won't get you a beast that can level, learn attack or have a class to be able to sneak attack, under RAW.
If you house rule it with your DM, here is a popular Reddit Thread for different customizations for creating different Warlock Pact of Chain familiars that are about the same CR/XP as the Sprite and Imp that Pact of Chain allows.
There is an alternative way, variant rule, to get a pseudo-dragon or imp as a familiar laid out in the sidebar of their listings in the Monster Manual. They aren't really under your control (they are controlled by the DM), they aren't spirits but real creatures that can die, and they can't be summoned back at the cost of an hour and a gold. Giving them to a player is a variant rule at the DM discretion.
If you were to house rule a solution using a familiar specifically, this would most likely be the least likely to create a balance problem. As the DM can take this toy away if the player abuses it.
If you want a pet that can do serious attacks, RAW, your better bet is to look at the Ranger's Beast Master option; but you'd still have to house rule something with your DM if you're dead set on rogue abilities/sneak attack.
Only if your DM allows it.
A familiar from the Find Familiar spell has a limited number of things it can do for you. A point to remember (from the spell description) is that the familiar is a spirit that inhabits the cat's body. What happens if it dies? When you summon one with the next spell, is it the same spirit? Discuss this with your DM. (Here's an example of the thought process on making a custom creature fit into an adventuring party).
If your DM agrees, you need a custom made creature. There isn't a beast with character classes, character class features, and character levels in the standard published material. (A cat is a beast, which is a type of creature. See Monster Manual, page 6).
Your DM has (in the Dungeon Masters Guide, p. 273-283) guidelines for creating custom creatures and custom Non Player Characters (NPC's). The DM will need to keep any eye on the Challenge Rating (CR) of this custom creature so that it isn't unbalanced.
Challenge Rating(DMG, p. 92)
An NPC built for combat needs a challenge rating. Use the rules in chapter 9 to determine the NPC's challenge rating, just as you would for a monster you designed.
A regular cat trying to hold weapons will have difficulty due to a lack of opposable thumbs, and a lack of hands. You and your DM could come up with custom made / homebrew weapon(s) suited for a cat. If the NPC cat could have class levels and class features, all of that would need detailed work done by you and your DM. (Working on this creation together could be fun all by itself).
As @KorvinStarmast states: Only if your DM allows it.
But if I was your DM, I'd give you a resounding "No.".
The Find Familiar spell clearly states:
A familiar can't attack, but it can take other actions as normal.
Also, I don't see how a cat's paws would ever be able to wield anything, no opposable thumbs! No weapons.
Also, a familiar is a "spirit" and has no attributes (such as Strength, Dexterity, etc), so as far as I'm concerned, it cannot take on a class at all.