You are thinking of an option there. An option give the owner of the option the right to buy or sell the price at a future specified date at future specified price. Forward futures contracts on indices and commodities are delivery date based also.
When it comes to short selling of individual shares the facilitating broker borrows the shares and then lends them to the short seller to sell in the market. I should know, I have done it enough times.
Yes, if you short sell without owning the asset, then you are naked short selling. It's not illegal in any jurastiction that I have ever heard of. They might put me in prison for my facebook posts, but i've been a naked short seller a lot of times I have never had the police come round to my house to ask me what I was thinking!