Here’s two tutorials on using these query arguments:

Customizing the WordPress Query – using pre_get_posts for the main query

Custom WordPress Queries – For generating custom queries