I`m a novice of chess, but have been enjoying playing the program that came on my mac book pro. It seems to me that there have been some moves the computer will not allow me to make. For instance, mac had me in check with a knight but I had a direct diagonal on the knight with a pawn. The computer would not allow me to take the knight. Another instance was I had had the mac king in check with my queen (diagonal) and the king took my queen but, in the reverse my king could not take macs queen. More recently I had a diagonal kill with my king on macs rook. The computer would not allow my king to make the move and take the rook. A one space move. Directly next to each other diagonally. Are there situations where pawns can't take knights or Kings can't take queens or rooks?
Are there situations where pawns can't take knights or Kings can't take queens or rooks?
Yes, all the situations described in your post could happen, consistent with the rules of chess. For instance, in each of the following two positions the white pawn cannot capture the knight because it is pinned to the white king. That is, the capture would open the king to check, and so is not a legal move.
[fen "8/5k2/6b1/3n4/4P3/3K4/8/8 w - - 0 1"]
[fen "4r3/5k2/8/3n4/4P3/8/4K3/8 w - - 0 1"]
But there's nothing special about the pieces involved being pawns or knights; the relevant point is simply that the capture would expose the king to check, and such a move is never legal.
Similarly, a king isn't allowed to capture any opposing piece that is defended by one of its compatriots, again for no other reason than that such a move would expose the king to check. Thus the white king may not capture the rook in the following position, as doing so would place the king into check from the knight.
[fen "8/5k2/4n3/8/3r4/2K5/8/8 w - - 0 1"]