If you would like to attack a target simply, right click on the target to initiate the attack. Even at a distance if you right click the target your character will move towards it and initiate a basic attack. When doing this, character will use the current weapon equipped.
To initiate a skill to attack a target, one must first learn that skill. You can place Skill Points (SP) onto the desired skill. SP can be earned by leveling up or performing quests. When you have place SP into the desired skill , you have learned that skill. You would then need to place the skill in your hotbar or arrange your skills onto the quick slot menu for easy access. Press on the corresponding button to the quick slot menu on your keyboard to initiate that skill
Keyboard and mouse controls
Here are the list of controls to ensure you maximize your gaming experience in RO2.