I am referring to this discussion. I have never written any code in C or in C++ . I do not have any CS background. However I have been working as Java developer for 5 years
The compiler optimization answers are correct. There is another usage, though - in refactoring, inlining refers to replacing a method call with the body of the method and then removing the method. See Inline Method. There are similar refactorings, such as Inline Class.
EDIT: Note that refactoring is done manually or with a tool; in either case it involves changing the source code.