i'm looking for something simple

the game/program i'm creating i want my
joystick to do simple tasks

how do i get my program to recieve and understand
what my joystick is doing


ex up, down, left, right, button a, button b... and so on

the simpler the better