A chessboard has 8 rows and 8 columns and is made of 64 squares that cannot be divided further. It is assumed that these are the squares you are referring to as "basic" squares that make up a chessboard.
When two squares are being selected from a chessboard, the number of ways in which this can be done is equal to C(64, 2) = 2016. In each row and each column there are 7 sets of squares that share a common side. The number of ways of choosing a set of squares with a common side is 7*(8+8) = 7*16 = 112
The required probability of picking two squares from a chessboard with a common side is equal to 112/2016 = 1/18
If two squares are chosen at random from a chessboard there is a probability of 1/18 that they share a common side.