Richard Castle is a celebrity murder-mystery author who autographs women's breasts during book signings and makes enough cash from his 26 bestsellers to live in a glorious NYC apartment with his daughter Alexis and mother Martha. Amazingly enough, these are the more realistic aspects of his life.
In a plot point we're meant to glide over, the Mayor (clearly not of sound mind) has allowed Castle to work with the NYPD Homicide Division to do research for his books. Inspired by (read: infatuated with) Detective Kate Beckett, Castle decides to base a series of books on her, which is something she pretends to find irritating.
The twice-divorced Castle has a reputation for being an oversexed egomaniac, and yet he spends most of his free time eating ice cream with his daughter and playing poker with his wonderfully wry author friends. What can we say? The man is an onion.