EDIT: I'm assuming that what you're asking is this: Given a string of characters, how do I determine all possible substrings that are palindromes?
You can build up from single characters, which are trivially palindromes of themselves, then consider all substrings of length 2, and then all substrings of length 3. 
Fortunately, a palindome has the recursive relationship such that if you removed the first and last letters, you must still have a palindrome. Therefore, if a string of length 4 is a palindrome (Like ABBA), then the substring with the first and last characters removed ('BB') must also be a palindrome.
Consider a dynamic programming solution to compute this for any given string, as the recursive relationship defined above satisfies the optimal subproblems requirement for DP.