To assist in city planning I believe mobile users can flatten their buildings to allow them to utilize available space efficiently. For desktop users, elven architect allows for space planning for their cities.
Press the research button at the bottom to go to the research page. You place normal knowledge points in there for research
If it's for a quest step of "spend knowledge points" the quest also counts donating KP to an ancient wonder - including using an ancient wonder instant to do so. Sometimes you can do this to complete the quest step when you haven't got any regular KP at the moment.