Solvency and liquidity. How to understand them? Should Central Banks only lend to solvent but illiquid banks? Solvency: Long-term liabilities are covered by assets(with value measured at maturity, not at market-to-market)

Liquidity: short-term liabilities are covered by assets which can be sold in the short-term.

Is this it?

Should CB lend to insolvent banks? or only to solvent but illiquid banks? This related to the problem of moral hazard, where if banks are being bailed out, more can think that their liability side is being covered by the CB/Government...
Yes, your thinking about solvency and liquidity is in the right direction. An easier way to think about them is: Liquidity means that a bank has enough resources to meet its obligations and Solvency means the bank owns more than it owes.

Lending to solvent but illiquid banks is a less risky thing to do for the central bank because the bank needs more liquidity at the moment but it owns enough long-term assets to repay the debt. Bagehot was the first to publicise this insight. It is called Bagehot's rule.

Lending to insolvent banks (banks that owe more than they own) may be risky because it's long-term assets are significantly limited for the bank to repay this debt. This has the potential to cause a moral hazard because the bank is likely to come back to borrow more from the central bank in the future.