1. In E: D start menu: Options -> Controls
At the top, select any of the presets you see - Empty, Generic Joystick or somesuch.
Now you see some controls have been assigned (if you didn't choose "Empty"). You can tweak the bindings as much as you like.
Assigning a control bind: use your mouse to select the desired control (empty box below/beside the text if assigning new - if tweaking old, the box has already some text, like Joy1_X-axis / D / Joy1_Button2 etc.) and then turn the axis on your stick or press the button or keyboard key you wish to assign. Be sure to assign roll & pitch as axis, not as buttons (click on roll axis, not on roll left / roll right etc.). Remember to click Apply at the bottom of the screen.
2. Start Pilot's License tutorial stage 2: Target practise
In this scenario you can freely test your flight and combat controls, and learn to control your ship. Learn at least to fly loops around the big rocks and those pesky canisters. Also learn to shoot the canisters while you're moving - towards them, away from them, strafing vertically/horizontally etc.
If you find you need to tweak a control, like invert an axis, hit ESC and select Options -> Controls again. Remember to click Apply at the bottom of the screen.
3. Once you feel confident in basic flying and your control bindings, you're ready to get going. If you're new to Elite, I recommend trying the tutorials first (reminder: Pilot's License tutorial stage 4: Travel has a bug that prevents the hyperspace sequence from finishing).