So lets say you got an normal wifi network with wpa 2 encryption.
First you need to ensure your card is in monitor mode and listening on the channel the AP is transmitting on.
Now you are going to capture all the packets. But they won't make sense since they are encrypted
But then you will of course say I got the key well you do but the key is only used to encrypt the 4 way handshake which occurs when a client associates with the ap after that the client and the AP encrypt the traffic with what is stated in the 4way handshake.
So what you need to do is to capture the 4 way handshake. This can be done easily with wireshark. But you need to wait for somebody to connect to the AP so that you can capture this 4 way handshake.
This would take a long time good thing there is this awesome toolkit made by mistrx called aircrack-Ng which allows you to do mess around with wifi and even deauthenticate sombody which are authenticated making the handshake occur again.
What you do is this
Aireplay-Ng -0 1 -a [mac of ap] -c [mac to deauth] (name of wifi card)
You should have wireshark running already for this
You should then or even before go to (in wireshark)
Edit->prefrences->protocols->iee 802.11 and ad your keys
If you have any difficulty
You could follow this