This is a discussion on Who wins? within the online poker forums, in the Learning Poker section; Why isnt the 3 of clubs in play here and why will it be shared pot.
Also is thr pot shared only shen both the players
I think you forgot to share the play in question, so it's kinda hard to tell.
The pot is shared when both players have the same best 5 cards. So you can have the same hand than your opponent (ex : AQo) and loose cause he has a flush and you don't. You can also have different hands and still split. Example : You have AKs of clubs and your opponent has AQs of diamond. The board comes to AKQ43 of spades. In that case, the 5 best cards are already on the board, so you share.
Make sure that you are posting the hand so that we are able to properly comment. Like Failx21 said, you both play your best 5 possible cards which likely means that you both played the same community and possibly a same hole card.