Assume if I want to change the value of
php_value post_max_size 20M in .htaccess
post_max_size 20M in php.ini
Both will do same operation. So
It depends on how PHP is installed on your server; if its installed as an apache module, then you'll use .htaccess files to issue PHP directives as .htacess is read and executed by Apache.
If you run PHP as CGI, then you'll use a php.ini file, as anything in .htaccess woudln't affect your PHP.
You can check how PHP is installed by making a php file with phpinfo(); it in.
This only refers to local overrides for a specific directory; regardless of how PHP is installed it reads your main php.ini file.