The SWTOR Jedi Knight is the most popular class in Star Wars The Old Republic despite being the least flexible. This and its counterpart the Sith Warrior are the only two classes in all of SWTOR which can only fill two functions: DPS and tanking.
The Jedi Knight is a melee class which naturally uses primarily a lightsaber to attack and deal damage. It also has some force attacks but definitely centers in on using its lightsaber.
The way this class plays depends on which of its advanced specializations you pick. The two options are Sentinel and Guardian. The Sentinel is the most popular option as it allows your Jedi Knight to dual-wield lightsabers (which is always popular) and makes this class focus on dealing damage. It is the only class in game (along with the Sith Warrior) that has access to three different talent trees which all focus on dealing damage.
As a result, if you know you want to be a melee damage dealer, you really want to pick the SWTOR Jedi Knight. The only downside to this class is that there is so many of them it can be hard to get into groups. It works best if you have a guild you can apply to or you simply plan on playing solo.
On the opposite side of the coin is the Guardian. This Jedi Knight advanced class focuses on handling damage rather than dealing it. This class boosts its own defenses as well as increasing its HP rather than looking to deal more damage. This makes it one of the primary tanking classes in the game.
If you want to play solo as a Guardian, you can always spec into its damage dealing tree. It does not have an option to dual wield lightsabers but it at least gives you a spec you can farm with, level up as, or mess around in PvP with. Don’t expect to raid as a damage-dealing Guardian though, at least not in any good groups.