Basically, yes.
When a binary is executed, the kernel detects for which platform it was built (FreeBSD, Linux, …). If it is a non-native binary – i.e. not FreeBSD – two things happen: First, the kernel switches to an alternative set of system calls that implements the system calls of the binary’s target platform. Second, the location of file system paths is changed so that files are searched under
/compat/<platform> first. If it doesn’t exist there, it is searched in the usual place, i.e. rooted at “/”.
The above is a somewhat simplified explanation, but basically that’s how it works. And in fact it works surprisingly well. I'm using several Linux programs on FreeBSD that are closed-source or cannot be compiled on FreeBSD for other reasons. There are even some Linux programs in FreeBSD’s ports collection.
Note that you can even install a complete Linux system inside a
jail(8) environment. FreeBSD provides special
linprocfs(5) and
linsysfs(5) file systems that can be mounted on
/proc and
/sys, respectively – They're not 100 % complete, but it’s enough to make most Linux programs happy.
If this is true, it means that I can run software for all operating system in a BSD?
Not, not all. Currently, compatibility layers exist for Linux 32bit and 64bit binaries. In the past there existed several others to execute SysV and BSD/OS binaries, but those have been removed because nobody used them anymore.
To execute Windows programs, there is WINE, which works about as good as it does on Linux.
For everything else you need to run a guest OS inside a VM. FreeBSD has a native hypervisor named
bhyve(4), but it also supports several 3rd-party hypervisors like VirtualBox (
emulators/virtualbox-ose). Qemu (
emulators/qemu) is an option, too.