Read about algorithms SICP, TAoCP and similar books will help.
What languages do you know and what you want to do exactly?