Two ways to point at a file
An absolute path starts at the root: /Users/me/projects/foo.txt. It always means the same file no matter where you are. A relative path is interpreted from your current working directory: projects/foo.txt means "projects/foo.txt under wherever I am right now."
Special navigation tokens
.— current directory..— parent directory~— your home directory~user— that user's home-(only withcd) — previous directory
Combine them: cd ../../sibling-project, cp ./local.txt ~/backups/.
When to use which
Scripts that run from cron or CI should use absolute paths — you don't know what their working directory will be. Day-to-day shell work uses relative paths because it's faster and reads naturally. The shebang line at the top of every script is always absolute: #!/usr/bin/env bash is interpreted by the kernel, which has no concept of "current directory."
Resolving paths programmatically
realpath foo.txt turns a relative path into an absolute one and resolves symlinks. readlink -f is similar (Linux). On macOS, realpath is in coreutils via Homebrew, or use the BSD trick cd "$(dirname foo.txt)" && pwd -P.