"Take out the trash": The trash is in your home and you have to take it out for the garbage collectors.
"Take out your books from your bag": Your books are in your bag and you have to take them out so that they're not in your bag anymore.
"Take out a book from the library": Borrow a book from the library.
"Take out a loan": Similarly, you can borrow money.
"Take someone out": Go out with someone. This is used for romantic dates. When you take someone out, you're the one who has invited them, and usually you're expected to pay for them.
"Take someone out" can also mean fight with them and knock them out or kill them.
As Peachey said, this depends on the context.