Visual Studio (precompiled libs)

Open the Project Properties.
Visual Studio Project Properties

In both debug and release mode, add the include and library directories.
Visual Studio Additional Include Directories Visual Studio Additional Library Directories

In both debug and release mode (this time seperately), you must add the library to link with. When you are only going to use one mode then you obviously don’t have to change the other one.
When linking statically you will need to link to tgui-s.lib and tgui-s-d.lib instead of tgui.lib and tgui-d.lib. The order of linking is also important: first sfml, then tgui.
Visual Studio Additional Dependencies (Release) Visual Studio Additional Dependencies (Debug)

When linking dynamically, don’t forget to copy the needed dlls to the directory where your compiled executable is.