Let's say you have a SharePoint 2010 solution wsp and you want to deploy SharePoint 2013 environment and we do that with the Compatibility Level in SharePoint 2013.
Here are the power shell commands to achieve this.
Install-SPSolution –Identity mysolution.wsp –GACDeployment –CompatibilityLevel {14,15}
14 Hive folder - SharePoint 2010
15 Hive folder - SharePoint 2013
mysolution.wsp - wsp created in sharepoint 2010 environment.
Happy Share Pointing :-)